Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

menu bar is not visible when designing

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
neelam aggarwal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Let nothing stop you! Not even this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic