Showing posts with label swing. Show all posts
Showing posts with label swing. Show all posts

Friday, December 18, 2009

JTabbedPane for Netbeans Desktop Application

If any desktop application created in netbeans is using several tabs. Then each time the application is started, it will show the last selected tab. Even , by initially calling setSelectedIndex(int index) methodof JTabbedPane wont work. To resolve this issue following steps needs to be followed :Go to the class which extends SingleFrameApplication (,i.e,having public static void main).Update the overridden method shutdown() by selecting the default tab before super.shutdown() is called.

setResizable for Netbeans Desktop Application

  • Go to the class which extends SingleFrameApplication (,i.e,having public static void main)
  • Update the overridden method startup() by calling this.getMainFrame().setResizable(boolean resizable) after show(View view) is called.