Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jframe not diaplaying components

 
Paras Ahuja
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


my label and comboox are no displayed on the frame. Please help....
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
assumption: the label.comboBox are part of the abs components

this
getContentPane().add(abs.rname);

is added to the default position of the frame's default LayoutManager
(you've commented out the GridBagLayout, so the rest of the constraints is useless)

now, when you add this
getContentPane().add(abs.cb[2]);

it is added to the same spot as the earlier one, effectively knocking out the earlier one.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic