This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

setting taborder  RSS feed

 
Yogesh Dhond
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i set the taborder of the Jtextfields within the JFrame?
 
jay vas
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well if youre using a JTabbedPane, you just add the tabs
in the order which you want them to be displayed.

i.e.

//displays a frame with two tabs.
public static void main(String[] args)
{
JFrame f = new JFrame();
JTabbedPane j = new JTabbedPane();
j.addTab("Panel 1" , new JPanel());
j.addTab("Panel 2" , new JPanel());

f.getContentPane.add(j);

f.setVisible(true);
}

-j
 
Michael Dunn
Ranch Hand
Posts: 4632
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!