3

I'm using netbeans to write the GUI. I have a menu bar with few menu items and the main window has a text area all over it. when I press the menu item,I cant see it because the text area is on top (the menu item internal frame is behind the text area)how can I make the menu item internal frame to be on the top ?(the text area will be on the background)

thanks

mKorbel
  • 109,525
  • 20
  • 134
  • 319
Avi
  • 69
  • 1
  • 2
  • 4
    Please provide a [SSCCE](http://sscce.org/) – MByD Aug 17 '11 at 10:14
  • 1
    Are you using layouts? Usually, it simplifies the things... – Charliemops Aug 17 '11 at 10:15
  • 1
    See also this [tutorial](http://netbeans.org/kb/docs/java/quickstart-gui.html). – trashgod Aug 17 '11 at 10:16
  • 3
    are you sure that you didn't mixing AWT Componets with Swing JComponents, then is everyting possible, including your issue http://java.sun.com/products/jfc/tsc/articles/mixing/ and http://java.sun.com/developer/technicalArticles/GUI/mixing_components/ – mKorbel Aug 17 '11 at 10:22

2 Answers2

3

I'm not sure what problem you are facing but it seems like you are looking for JLayeredPane

Some useful links:

  1. How to use layered pane
  2. How to use Internal frames
Harry Joy
  • 58,650
  • 30
  • 162
  • 207
2

Try to specify a Z-Value index higher for the JMenu , when adding it to its container component.

Heisenbug
  • 38,762
  • 28
  • 132
  • 190