• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet with sliding buttons.

 
Brusk Baran
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hoi Ranchers,
i have such a problem:
say I have 50 customers with their own web sites. I would like to show them 8 a time in a Panel.
What I have done is that:
Created a JPanel with CardLayout layout manager.
then created the so many 50 buttons, and thereafter created the 50 different JPanels, each of which will contain 8 of these buttons' references (i.e. 0..7, 1..8, 49..6)
@T Last added one by one these 50 JPanels to the main JPanel which is being managed by the CardLayout layout manager.
In order to create the moving Button-(JPanel s); in the actionPerformed(ActionEvent ae) {} method use (CardLayout) myMainJPanel.getLayout().next(myMainJPanel); but somehow then I cannot see any buttons thereafter,
Where might I be missing anything?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic