import javax.swing.*;
import java.awt.*;
import java.net.*;
import java.io.*;
import java.util.*;
public class SVCD2VCD extends JFrame{
JLabel quellverzeichnis_label = new JLabel("Quellverzeichnis");
JTextField quellverzeichnis_textfeld = new JTextField(20);
JLabel zielverzeichnis_label = new JLabel("Zielverzeichnis");
JTextField zielverzeichnis_textfeld = new JTextField(20);
JLabel tmpgverzeichnis_label = new JLabel("TMPGEncverzeichnis");
JTextField tmpgverzeichnis_textfeld = new JTextField(20);
JLabel projectverzeichnis_label = new JLabel("Projectverzeichnis");
JTextField projectverzeichnis_textfeld = new JTextField(20);
JLabel suchenach_label = new JLabel("Suche nach:");
JTextField suchenach_textfeld = new JTextField(20);
JButton quellfilechooser_button = new JButton("Öffnen");
JButton zielfilechooser_button = new JButton("Öffnen");
JButton tmpgfilechooser_button = new JButton("Öffnen");
JButton projectfilechooser_button = new JButton("Öffnen");
JTextArea statusTextfield = new JTextArea(5,30);
JButton go = new JButton ("Go");
JButton cancel = new JButton ("Abbrechen");
JButton speichern = new JButton ("Speichern");
JButton exit = new JButton ("Exit");
public SVCD2VCD(){
super("SVCD2VCD");
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setLocation(
(Toolkit.getDefaultToolkit().getScreenSize().width-this.getSize().width) / 2,
(Toolkit.getDefaultToolkit().getScreenSize().height-this.getSize().height) / 2
);
try{
UIManager.setLookAndFeel("com.shfarr.ui.plaf.fh.FhLookAndFeel");
}
catch (Exception e) {
e.printStackTrace();
}
/*pane --> eingabepane + buttonspane + statusTextfield
eingabepane --> quellpane + quellverzeichnis_textfeld + zielpane + zielverzeichnis_textfeld + tmpgpane + tmpgverzeichnis_textfeld + projectpane + projectverzeichnis_textfeld + suchenach_label + suchenach_textfeld
quellpane --> quellverzeichnis_label + quellfilechooser_button
zielpane --> zielverzeichnis_label + zielfilechooser_button
*/
JPanel pane= new JPanel();
pane.setLayout(new GridLayout(3,1));
//eingabepane
JPanel eingabepane = new JPanel();
eingabepane.setLayout(new GridLayout(5,2));
JPanel quellpane = new JPanel();
quellpane.setLayout(new GridLayout(1,2));
quellpane.add(quellverzeichnis_label);
quellpane.add(quellfilechooser_button);
eingabepane.add(quellpane);
eingabepane.add(quellverzeichnis_textfeld);
JPanel zielpane = new JPanel();
zielpane.setLayout(new GridLayout(1,2));
zielpane.add(zielverzeichnis_label);
zielpane.add(zielfilechooser_button);
eingabepane.add(zielpane);
eingabepane.add(zielverzeichnis_textfeld);
JPanel tmpgpane = new JPanel();
tmpgpane.setLayout(new GridLayout(1,2));
tmpgpane.add(tmpgverzeichnis_label);
tmpgpane.add(tmpgfilechooser_button);
eingabepane.add(tmpgpane);
eingabepane.add(tmpgverzeichnis_textfeld);
JPanel projectpane = new JPanel();
projectpane.setLayout(new GridLayout(1,2));
projectpane.add(projectverzeichnis_label);
projectpane.add(projectfilechooser_button);
eingabepane.add(projectpane);
eingabepane.add(projectverzeichnis_textfeld);
eingabepane.add(suchenach_label);
eingabepane.add(suchenach_textfeld);
//buttonspane
JPanel buttonspane = new JPanel();
buttonspane.setLayout(new GridLayout(2,2));
buttonspane.add(go);
buttonspane.add(cancel);
buttonspane.add(speichern);
buttonspane.add(exit);
//statusTextfield in Scrollpane
JScrollPane scrollpane = new JScrollPane(statusTextfield, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
statusTextfield.setEditable(false);
statusTextfield.setLineWrap(true);
pane.add(eingabepane);
pane.add(buttonspane);
pane.add(scrollpane);
setContentPane(pane);
setVisible(true);
pack();
}
// main-Methode
public static void main(String[] arguments) {
SVCD2VCD panel = new SVCD2VCD();
}
}