How to set transparent background of JDialog

前端 未结 3 1516
南笙
南笙 2021-01-11 17:43

Hy,..

how can i set the background transparent and \"remove\" the closeoperation (marked red) ? I only want to show the card :-)

3条回答
  •  太阳男子
    2021-01-11 18:28

    yourDialog.setUndecorated(true)should do the trick for the title bar.

    For having the Frame transparent. You'll have to work on the root panel with yourDialog.getRootPane().setOpaque(false)on it.

提交回复
热议问题