This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes a few questions about JToolBar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "a few questions about JToolBar" Watch "a few questions about JToolBar" New topic
Author

a few questions about JToolBar

Rusty Shackleford
Ranch Hand

Joined: Jan 03, 2006
Posts: 490
I created a JToolBar and placed it on a JFrame, underneath a JMenuBar.

The problem I am having is it won't connect right below the JMenuBar, there is a dotted line(not sure what it is called) between the menu bar and tool bar. Clicking on that dotted line and sliding it up a bit will connect it. Is there a way to get this behavior by default? I looked at suns tutorials and JToolBAr docs, but nothing obvious jumped out.

Also, why did I have to call SetOrientation and pass it VERTICAL to get it to lay out horizontally across the JFrame? Passing it HORIZONTAL laid it out vertically on the left side of the JFrame.


"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
Rusty Shackleford
Ranch Hand

Joined: Jan 03, 2006
Posts: 490
I got it working correctly, thanks anyway
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38509
    
  23
Glad you got it sorted, Rusty. The reason we didn't reply was because we didn't know how to help.

But how did you sort out the problem?

CR
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: a few questions about JToolBar