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

First land Last card in Cardlayout  RSS feed

 
Sandesh Jadhav
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any direct way in Cardlayout to find out whether the currently displaying card is the first or the last card ?

Thanks
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No direct way; Sun decided to keep the "currentCard" field hidden from us, without a public accessor.

An indirect way:
You see, a CardLayout simply hides all non-shown cards, and only one of them is visible at a time.
 
Sandesh Jadhav
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob, it worked.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!