Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. how to convert swings to java applet

how to convert swings to java applet

Scheduled Pinned Locked Moved Java
tutorialjavacom
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 4637012
    wrote on last edited by
    #1

    hi how to convert java swings application to java 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_CLOSE); 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(); } }); } } have a nice day bye naga

    N 4 2 Replies Last reply
    0
    • U User 4637012

      hi how to convert java swings application to java 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_CLOSE); 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(); } }); } } have a nice day bye naga

      N Offline
      N Offline
      Nagy Vilmos
      wrote on last edited by
      #2

      0. Wrap you code in <PRE> tags, it'll keep it flame-retardent. 1. What have you tried? You have to make an effort for anyone here to help, just asking for code won't be of any use.


      Panic, Chaos, Destruction. My work here is done.

      1 Reply Last reply
      0
      • U User 4637012

        hi how to convert java swings application to java 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_CLOSE); 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(); } }); } } have a nice day bye naga

        4 Offline
        4 Offline
        4277480
        wrote on last edited by
        #3

        Applet Code

        import java.applet.*;
        import java.awt.GridBagConstraints;
        import java.awt.GridBagLayout;
        import java.awt.Insets;
        import com.standbysoft.component.date.swing.JDatePicker;

        public class GeneralDemo_2 extends Applet
        {
        private JDatePicker datePicker;
        public void init()
        {
        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));
        }
        }

        HTML Code

        Make sure you have the jdatepicker.jar in the same location as your .class and html Good Luck

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups