0

I am trying my hand in swing applications and would like to know if there is a way to increase the height of the title bar of a JFrame/JDialog?

enter image description here

And also Can I get rid of the Swing icon and replace it with an icon of my own choice?

Sorry if this is a repeated question/too silly , I just haven't found a suitable answer anywhere yet :( Thanks !

rnaikzz
  • 113
  • 2
  • 13

1 Answers1

4

.. if there is a way to increase the height of the title bar of a JFrame/JDialog?

Given that wold make that one app. inconsistent with all the other apps. that open on this machine, I'd sure hope not. (And as far as I know, 'no it is not possible'.)

Can I get rid of the Swing icon and replace it with an icon of my own choice?

See JFrame.setIconImage(Image).

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
  • I added an icon of my choice in the title bar and it is very small and unclear now. Hence I was hoping to increase the size of the bar but I guess I will find a work around with changing the icons dimensions. Thank you :) – rnaikzz Mar 10 '16 at 21:04
  • *"..I guess I will find a work around with changing the icons dimensions."* The OS will use whatever size of icon it prefers, and will scale the icon to suit (on Windows at least). See [Sizes of frame icons used in Swing](http://stackoverflow.com/questions/18224184/sizes-of-frame-icons-used-in-swing) for more details. – Andrew Thompson Mar 10 '16 at 21:23
  • Awesome ! Thanks a lot :) that helped . – rnaikzz Mar 10 '16 at 21:52