Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
package com.test;
import java.awt.TextField;
import javax.swing.*;
public class testApplet extends JApplet
{
public testApplet()
{
super();
TextField txt1 = new TextField("", 30);
add(txt1);
}
private static void createAndShowGUI()
{
JFrame.setDefaultLookAndFeelDecorated(true);
//Create and set up the window.
JFrame frame = new JFrame("DragPictureDemo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Create and set up the content pane.
testApplet demo = new testApplet();
frame.setContentPane(demo);
//Display the window.
frame.pack();
frame.setVisible(true);
}
public void init()
{
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater
(new Runnable()
{
public void run()
{
createAndShowGUI();
}
}
);
}
}