Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Posts
    2
    Rep Power
    0

    Default convert swings to applet

    hi i want to convert these swings application to applet.

    please guide me.

    import java.awt.Component;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.Insets;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.ItemEvent;
    import java.awt.event.ItemListener;
    import java.text.DateFormatSymbols;
    import java.util.Calendar;
    import java.util.Locale;
    import javax.swing.DefaultListCellRenderer;
    import javax.swing.JCheckBox;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JList;
    import javax.swing.JPanel;



    import com.standbysoft.datepicker.JDatePicker;

    public class GeneralDemo extends JPanel {

    private JDatePicker datePicker;


    public GeneralDemo() {

    datePicker = new JDatePicker();



    setLayout(new GridBagLayout());

    add(datePicker, new GridBagConstraints(0, 7, 1, 1, 0.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0));

    }

    private static void createAndShowGUI() {

    JFrame frame = new JFrame("GeneralDemo");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS E);


    GeneralDemo newContentPane = new GeneralDemo();
    newContentPane.setOpaque(true); //content panes must be opaque
    frame.setContentPane(newContentPane);

    //Display the window.
    frame.pack();
    frame.setVisible(true);
    }

    public static void main(String[] args) {

    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    }
    });
    }
    }

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Read the Applet tutorial from Sun, make an attempt and post if you get problems with your code.

Similar Threads

  1. Convert THE APPLET CODE TO SWING USING JPANEL
    By jammyjamsticy in forum AWT / Swing
    Replies: 2
    Last Post: 12-22-2011, 09:16 AM
  2. Swings
    By bsantosh in forum AWT / Swing
    Replies: 4
    Last Post: 08-31-2009, 02:10 PM
  3. convert application to applet in netbeans
    By dbashby in forum New To Java
    Replies: 7
    Last Post: 04-18-2009, 03:49 AM
  4. Convert to Applet
    By Urgle in forum New To Java
    Replies: 1
    Last Post: 11-12-2008, 01:15 PM
  5. Convert a program to Applet
    By carl in forum Java Applets
    Replies: 2
    Last Post: 08-09-2007, 09:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •