Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Next button  RSS feed

 
Ah Ling
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

can anyknow kindly give me one example of a next button?
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Next button for what? If you mean you want to create something like a wizard (you know, next-next-finish) check out CardLayout.
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah Ling wrote:Hello!

can anyknow kindly give me one example of a next button?

 
Ah Ling
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings.

The next button is a button which will navigate through the various items in my database.
But will not be changing the panel. All will be displayed on one panel only.
Like there will be colour textfield, shape textfield etc. I have already retrieved the data from the database on the default panel itself.
The part where I am stuck is the loop for the next button, so to change the data displayed.
Is the cardlayout still applicable in my case?

Thanks!
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah Ling wrote:
The next button is a button which will navigate through the various items in my database.
But will not be changing the panel. All will be displayed on one panel only.
Like there will be colour textfield, shape textfield etc. I have already retrieved the data from the database on the default panel itself.
The part where I am stuck is the loop for the next button, so to change the data displayed.
Is the cardlayout still applicable in my case?

You can see how your first question was not even answerable (in a non-humorous way)? This one is much better and supplies us with much needed details.

I think that you'll probably not want to use a CardLayout since you'll not be changing components, but rather you'll be changing the text held by various Swing components. I would suggest that you create a class that encapsulates a slice of data from your database, and then writing your GUI so that it will be able to accept one of these slices (an object of the data class) and use this to display the text.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!