Search code examples
javaswingnetbeansjapplet

Converting a java application to a JApplet in Netbeans 7.4


I have created a java application that is supposed to work as a flight editor. I have a database and a total of 9 classes. Every class extends JFrame and is a separate form for each of the classes. So basically when you press a different button from the main frame it redirects you to another frame depending on the button you have pressed. I am doing this in NetBeans 7.4 and I want to convert it into an JApplet so that I can make it a web-application after finishing with the conversion. I have searched on the internet for guides on how to do that but the ones that could work for me are not up-to-date with the current NetBeans changes. If there is an easier way than what I have in mind feel free to say it.


Solution

  • total of 9 classes. Every class extends JFrame and is a separate form for each of the classes.

    don't to create bunch of JFrames use

    1. CardLayout with JFrame.pack() after card is switched

    2. remove a) JPanel contains JComponent, b) add another JPanel contains JComponent, c) call JFrame.(re)validate, JFrame.repaint(), then JFrame.pack() as last code lines, after all changes to already visible GUI is done

    and I want to convert it into an JApplet so that I can make it a web-application after finishing with the conversion.

    1. Java Web Start

    2. JavaFX container with Swing JComponents (JPanels by using CardLayout)

    3. pure JavaFx application