• Post Reply Bookmark Topic Watch Topic
  • New Topic

Panels  RSS feed

 
deepa karra
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I create 2 panels(one with checkboxes and the other with radiobuttons) in my applet?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should those panels be displayed simultaneously, or alternately? If the former, look into a GridLayout with 2 columns and 1 row. If the latter, have a look at CardLayout.
 
deepa karra
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both the panels should be displayed simultaneously. Do we need to create 2 different classes for both the panels and create objects for the panels in one program?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can create classes for the panels, but you don't need to. You could just add two JPanels in the GridLayout, and then place the individual components on the JPanels.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!