import java.awt.*; import java.awt.event.*; import java.applet.Applet; import javax.swing.*; public class Test1 extends Applet { private JPanel panel_1; private JButton button_1; private JButton button_2; private JTextArea textarea_1; private JScrollPane sp_textarea_1; private JTextField textfield_1; private JButton button_4; private JLabel label_1; private JLabel label_2; private JButton button_5; private JComboBox combobox_1; private JLabel label_3; public void init() { this.setBackground(Color.BLACK); Test1Layout customLayout = new Test1Layout(); setFont(new Font("Helvetica", Font.PLAIN, 12)); setLayout(customLayout); panel_1 = new JPanel(); panel_1.setBackground(Color.GREEN); add(panel_1); button_1 = new JButton("Play Hand"); add(button_1); button_2 = new JButton("Pass Hand"); add(button_2); textarea_1 = new JTextArea(" This Is My Test"); textarea_1.setEditable(false); sp_textarea_1 = new JScrollPane(textarea_1); add(sp_textarea_1); textfield_1 = new JTextField("textfield_1"); add(textfield_1); button_4 = new JButton("Submit"); add(button_4); label_1 = new JLabel("Chat:"); add(label_1); label_2 = new JLabel("A$$hole Apllet Test 1"); add(label_2); button_5 = new JButton("Randome Insult"); add(button_5); combobox_1 = new JComboBox(); combobox_1.addItem("Pussy"); combobox_1.addItem("Wimppy"); combobox_1.addItem("Moderate"); combobox_1.addItem("Extreme"); combobox_1.addItem("Sevre"); combobox_1.addItem("Fucking Hardcore"); add(combobox_1); label_3 = new JLabel("Random Insult Level"); add(label_3); setSize(getPreferredSize()); } public static void main(String args[]) { Test1 applet = new Test1(); Frame window = new Frame("Test1"); window.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); applet.init(); window.add("Center", applet); window.pack(); window.setVisible(true); } } class Test1Layout implements LayoutManager { public Test1Layout() { } public void addLayoutComponent(String name, Component comp) { } public void removeLayoutComponent(Component comp) { } public Dimension preferredLayoutSize(Container parent) { Dimension dim = new Dimension(0, 0); Insets insets = parent.getInsets(); dim.width = 719 + insets.left + insets.right; dim.height = 628 + insets.top + insets.bottom; return dim; } public Dimension minimumLayoutSize(Container parent) { Dimension dim = new Dimension(0, 0); return dim; } public void layoutContainer(Container parent) { Insets insets = parent.getInsets(); Component c; c = parent.getComponent(0); if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+32,704,368);} c = parent.getComponent(1); if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+400,136,24);} c = parent.getComponent(2); if (c.isVisible()) {c.setBounds(insets.left+144,insets.top+400,136,24);} c = parent.getComponent(3); if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+448,704,128);} c = parent.getComponent(4); if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+576,576,24);} c = parent.getComponent(5); if (c.isVisible()) {c.setBounds(insets.left+584,insets.top+576,128,24);} c = parent.getComponent(6); if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+424,272,24);} c = parent.getComponent(7); if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+8,328,24);} c = parent.getComponent(8); if (c.isVisible()) {c.setBounds(insets.left+584,insets.top+600,128,24);} c = parent.getComponent(9); if (c.isVisible()) {c.setBounds(insets.left+384,insets.top+600,200,24);} c = parent.getComponent(10); if (c.isVisible()) {c.setBounds(insets.left+208,insets.top+600,176,24);} } }