• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Adding Toolbar in DesktopPane (MDI Application)  RSS feed

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating MDI application in Java and using Desktop pane and internal frame for this. well
I a m adding menu bar that is working but I wana to add Toolbar as well so in design mode its showing toolbar as i run application toolbar is not appearing while menubar is ok.
Please Tell me how can i do that in desktop pane.
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
matif923 please re-read the JavaRanch UserName Guidelines and change your user name accordingly. User names are required to be in the form "First Name" + space + "Last Name".

If you are adding the Toolbar directly to the desktop pane, you will have to call setBounds on the toolbar to tell it where to show up and how big it is, because the desktop pane has a null layout by default. If your content pane is your desktop pane then you will have to do this. If your desktop pane is just added to your content pane you can put the toolbar in BorderLayout.NORTH of a JPanel, and put the desktop pane in BorderLayout.CENTER of the JPanel and then add the JPanel to the content pane.

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!