user2983372
user2983372

Reputation: 21

How do I change the tab order in netbeans?

This is how i want my tabs to work:

Tab1 Tab4

Tab2 Tab5

Tab3 Tab6


But when i use tab netbeans does:

Tab1 Tab2

Tab3 Tab4

Tab5 Tab6


How can i change the order of my tabs?

Upvotes: 2

Views: 11442

Answers (7)

user1908358
user1908358

Reputation: 13

Instead of using the "Change Order" use the Navigator panel (if using Netbeans). Make sure you are in the Design screen (not the source screen). There you can select the main panel that contains all the tabs and under it will be listed the TABS as panels. Then select the one you want to move and move it up or down to where you want it. A good solution is to rename the TABS to an easy to reference naming. I have 13 TABS (the TABs are named FinancialTAB, SummaryTAB, DiscountTAB, etc.).That way one can see where the TABS are located when using the Navigator section and can select them for moving up or down. Also note that when you select a TAB, the TAB in the "design" GUI screen will highlight -- that lets you know which TAB you have selected. Note: I use Netbeans 8.2.

Upvotes: 0

user1908358
user1908358

Reputation: 13

The order of "display" for tabs can be changed in the Navigator section of Netbeans 8.2. Find the one you want to move, right click and then drag it to the position in the list.

Using the "Change Order" doesn't change how the tabs are displayed at all. You have to physically move the tab to the place in the list of tabs where you want it to be "displayed". For example, tab number 10 can be moved to the 1st place so that it is always displayed as the the first tab.

Upvotes: -1

Shiv Buyya
Shiv Buyya

Reputation: 4130

Right Click on the JTabbedPane->Change Order->You will get option to Move Up and Move Down which will change the order of tabs.

Upvotes: 1

Anders Rasmussen
Anders Rasmussen

Reputation: 41

There is a option for the text field called Next FocusableComponent. You can use that to change the tab-order to anything you like.

Upvotes: 4

Jeffry Rakow
Jeffry Rakow

Reputation: 51

NetBeans 8.0 I believe the first component (ie. textBox) you add to the design window should be the one the cursor defaults to when you run the program. You can set the order for tabbing from component to component when you run the program in the design window. Select the first component. In the Properties window, go to nextFocusableComponent and choose the next component you want to tab to in the dropdown list. Repeat for rest of components.

Upvotes: 5

TechWithAMouth
TechWithAMouth

Reputation: 11

I was able to change the order of my tabs in the [Jframe] - Navigator window by selecting the jPanel under the jTabbedPane and dragging and dropping up or down

Upvotes: 1

deep
deep

Reputation: 9

Select your JFrame or JPanel or etc and then jField or jButton or etc of the JFrame and go to properties of the JField or JButton and enable the "focusCycleRoot" (this JField or JButton will be selected first in the jFrame or JPanel ) then select the "change order" of the JFrame or JPanel in the Navigator window and "Move up" or "Move down" to change the order.

Upvotes: -1

Related Questions