import java.awt.*; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; public class SimpleMenu { private Frame f = new Frame("test"); private MenuBar mb =…
import java.awt.*; import java.awt.event.*; public class SimpleMenu { private Frame f = new Frame("test"); private MenuBar mb = new MenuBar(); Menu file = new Menu("file"); Menu edit = new Menu("edit"); PopupMenu pop = new Po…
import java.awt.*;port java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionAdapter; import java.awt.image.BufferedImage; public class HandDraw { ; ; ; ; PopupMenu pop =…
import javax.swing.*; import java.awt.*; import java.awt.datatransfer.Clipboard; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.StringSelection; import java.awt.datatransfer.UnsupportedFlavorException; import java.io.IOExceptio…
import javax.swing.*; import java.awt.*; import java.util.Random; public class SimpleDraw { private final String RECT_SHAPE = "rect"; private final String OVAL_SHAPE = "oval"; private Frame f = new Frame("Test"); private JBut…
import java.awt.*; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; public class WindowListenerTest { private Frame f = new Frame(); ,); private Button bt…
import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class EventQs { private Frame f = new Frame("event test"); private Button ok = new Button("confired"); ); public v…
import java.awt.*; public class DialogTest { Frame f = new Frame("test"); Dialog d1 = new Dialog(f, "model dialog", true); Dialog d2 = new Dialog(f, "non-model dialog", false); Button b1 = new Button("open model dialog&q…
import javax.swing.*; import java.awt.*; public class CommonComponent { Frame f = new Frame("test"); Button ok = new Button("confirmed"); CheckboxGroup cbg = new CheckboxGroup(); Checkbox male = new Checkbox("man", cbg, true)…
import javax.swing.*; import java.awt.*; public class BoxSpaceTest { private Frame f = new Frame("test"); private Box horizontal = Box.createHorizontalBox(); private Box vertical = Box.createVerticalBox(); public void init(){ horizontal.add(new…