import java.awt.Panel;
import javax.swing.JApplet;
import java.awt.*;
import java.awt.Menu;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import javax.swing.*;
import java.io.*;
public class asd extends JApplet {
//Layoutelemente anlegen
JPanel panell = new JPanel();
JMenuBar bar;
JButton Button1;
JButton Button2;
JCheckBox Box1;
JCheckBox Box2;
JCheckBox Box3;
JCheckBox Box4;
JMenuBar Menubar;
JMenu Menu1;
JMenu Menu2;
JMenuItem Item1;
JMenuItem Item2;
JMenuItem Item3;
JMenuItem Item4;
JTextField textfeld = new JTextField("AUSGABE!!");
Color c = new Color(255, 255, 255);
JScrollPane JScrollPane2;
JScrollPane JScrollPane3;
JList list = new JList();
JList list3 = new JList();
JList list2 = new JList();
JScrollPane JScrollPaneausgabe;
JList listausgabe = new JList();
String list1text = "";
String list2text = "";
String list3text = "";
public void init() {
super.init();
//Layoutelemente zuweisen
Button1 = new JButton("Suche");
Button2 = new JButton("Erweiterte \nSuche");
Box1 = new JCheckBox("Gebrauchsanweisung");
Box2 = new JCheckBox("Prospekt");
Box3 = new JCheckBox("Service Manual");
Box4 = new JCheckBox("Kurzanleitung");
Menubar = new JMenuBar();
Menu1 = new JMenu("");
Menu2 = new JMenu("");
Item1 = new JMenuItem("Neu");
Item2 = new JMenuItem("Beenden");
Item3 = new JMenuItem("Info");
Item4 = new JMenuItem("Hilfe");
Button1.setBackground(Color.white);
Button1.setForeground(Color.blue);
Button2.setBackground(Color.white);
Button2.setForeground(Color.blue);
Box1.setBackground(Color.white);
Box2.setBackground(Color.white);
Box3.setBackground(Color.white);
Box4.setBackground(Color.white);
Box1.setForeground(Color.blue);
Box2.setForeground(Color.blue);
Box3.setForeground(Color.blue);
Box4.setForeground(Color.blue);
JScrollPaneausgabe = new JScrollPane();
add(JScrollPaneausgabe).setBounds(10, 300, 400, 200);
add(Button1).setBounds(430, 300, 180, 50);
add(Button2).setBounds(430, 370, 180, 50);
add(Box1).setBounds(20, 250, 150, 20);
add(Box2).setBounds(170, 250, 80, 20);
add(Box3).setBounds(250, 250, 120, 20);
add(Box4).setBounds(370, 250, 150, 20);
add(Menubar).setBounds(0, 0, 650, 30);
Menubar.add(Menu1).setBounds(0, 0, 20, 20);
Menubar.add(Menu2).setBounds(30, 0, 20, 20);
Menu1.add(Item1);
Menu1.add(Item2);
Menu2.add(Item3);
Menu2.add(Item4);
// Icons
Menu2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/help.png")));
Menu1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/fileopen.png")));
Button1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/xmag.png")));
Button2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kmag.png")));
Item1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/folder.png")));
Item2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/no.png")));
Item3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/hwinfo.png")));
Item4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/important.png")));
Button1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JDialog d = new JDialog();
d.setSize(230, 130);
d.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
d.setVisible(true);
}
});
Button2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JDialog d = new JDialog();
d.setSize(230, 130);
d.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
d.setVisible(true);
}
});
Item2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JDialog d = new JDialog();
d.setSize(230, 130);
d.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
d.setVisible(true);
}
});
JScrollPane JScrollPane1 = new JScrollPane();
JScrollPane2 = new JScrollPane();
JScrollPane3 = new JScrollPane();
add(JScrollPane1).setBounds(20, 40, 150, 200);
add(JScrollPane2).setBounds(200, 40, 150, 200);
add(JScrollPane3).setBounds(380, 40, 150, 200);
final DefaultListModel daten = new DefaultListModel();
list = new JList(daten);
JScrollPane1.getViewport().setView(list);
list.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 1) {
}
}
});
add(new JLabel("")).setBounds(60,10,100,25);
}
public void destroy() {
super.destroy();
}
}