This week's book giveaway is in the Agile and Other Processes forum. We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line! See this thread for details.
HI, I have a frame with a menu. Now just below the menu i have a JButton. My problem is that when i click on the menu, i get my menuitems. But unfortunately, the menuitem is almost at the same position as the JButton. But instead of the JMenuItem appearing in front of the JButton, i get the JButton in front of JMenuItem . Thus my JMenuItem is partially hidden bu the JButton. How do i overcome this. What i want is when i click on the menu, the menuitem should come over the JButton. I hope u guys help me out. Regards Saj
hi, if you place the button in the default layer, the menu would cover the button as it is painted in another layer (above the default one). (see the API for JRootPane, and the swing tutorial for detailed information.) have you added the button this way?: JFrame f = new JFrame(); Container content = f.getContentPane(); content.setLayout(new BorderLayout()); //or whatever layout content.add(new JButton("under menu"), BorderLayout.NORTH); JMenuBar bar = new JMenuBar(); // configure menubar f.setJMenuBar(bar); chantal
Hey, check out my mega multi devastator cannon. It's wicked. It makes this tiny ad look weak:
a bit of art, as a gift, the permaculture playing cards