| Author |
menu bar is not visible when designing
|
neelam aggarwal
Greenhorn
Joined: Jul 18, 2011
Posts: 19
|
|
i am using NetBeans 7.0 and in JApplet Form using palette I am dragging and dropping menubar but is not visible in design....
but appears when executed..
it is also not showing any properties in property window and displays 'no property'...
can you please tell me where I am lacking..
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4163
|
|
I've siad this before but I'll say it again. The NetBeans visual designer aka Matisse is categorically not a beginners' tool. It can however increase the productivity of a seasoned Swing programmer.
I recommend you learn how to create a GUI by coding, and familiarize yourself with the Swing API.
http://download.oracle.com/javase/tutorial/uiswing/index.html
http://download.oracle.com/javase/6/docs/api/javax/swing/package-summary.html
|
luck, db
There are no new questions, but there may be new answers.
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8430
|
|
Darryl Burke wrote: It can however increase the productivity of a seasoned Swing programmer.
I am not really sure about this.
Once I had a bet with one of my friends. We drew up (on paper) a UI design which was quite complicated. Then we started coding. I was hand coding while he was using NetBeans DnD UI builder.
1) I completed first
2) My code was more logically structured and easy to understand.
3) We found that I made more use of nested layouts. I had that flexibility and thus more control
4) My code could be imported into any IDE
5) I can type real fast
Based on my experience, I have found that DnD style UI builders are good for screen mock ups at best. But for that I personally prefer the Pencil sketch toolk simply because of the "hand drawn look" I can achieve, which is similar to this Napkin L&F
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
neelam aggarwal
Greenhorn
Joined: Jul 18, 2011
Posts: 19
|
|
i want to ask whether we can add menubar to a panel?
i made a panel whose layout is set to cardlayout and then added two other panel ..... i want in the first panel i shuld hav a menu bar and at the click of different menus , the different panels can be called...........
but i tried everything but except menu bar,I am able to do this with other controls...
when i place menubar on the panel it is not visible, when i add this using inspector window nothing happens and when i drag and drop to the panel , menu bar get added to the original Japplet form not on the panel..
please help
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8430
|
|
Usually menu bars are associated with the application and not a particular panel. If you want a context menu you should go for a JPopupMenu. The usual way to associate a menu bar is calling JFrame/JApplet#setJMenuBar() More information on menus here http://download.oracle.com/javase/tutorial/uiswing/components/menu.html
However, JMenuBar extends JComponent. So you should be able to add it just like you would add, say a JButton
Disclaimer: I have never tried this myself.
|
 |
 |
|
|
subject: menu bar is not visible when designing
|
|
|