0

I have a question in regards to a Java GUI I'm creating at the moment, it's an application that runs offsite backups.

When the application initially loads you are presented with this screen: loadscreen

After loading the configuration file it fills out each field in the tabs below; at this stage it is staying on the "Run" tab after I load the configuration file, but I'd like it (after filling out each field) to bring the "Configuration" tab to the screen. afterconfloaded

How do I go about doing this? In the method I've written to load config after the JFileChooser window is closed, I'd imagine I'll need to add something to tell it to select the Configuration tab.

I can provide the classes if necessary.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Kane Charles
  • 379
  • 3
  • 10
  • 19
  • 2
    [`JTabbedPane#setSelectedIndex(int)`](http://docs.oracle.com/javase/7/docs/api/javax/swing/JTabbedPane.html#setSelectedIndex%28int%29) – MadProgrammer Feb 06 '13 at 05:11
  • @MadProgrammer Its a CTabFolder, is the method similar? `CTabFolder tabFolder = new CTabFolder(shlKcbsOffsiteBackup, SWT.BORDER);` – Kane Charles Feb 06 '13 at 05:26
  • 2
    Next time, be sure to specify the UI library you're using. You'll want [`CTabFolder#setSelection(int)`](http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/custom/CTabFolder.html#setSelection(int)) – FThompson Feb 06 '13 at 05:31

1 Answers1

0

Exposing the component, then using the method:

CTabFolder#setSelection(int);

worked fine.

Thanks @MadProgrammer and @Vulcan

Kane Charles
  • 379
  • 3
  • 10
  • 19