64 lines
2.0 KiB
Java
64 lines
2.0 KiB
Java
|
|
import java.awt.*;
|
|
import javax.swing.*;
|
|
|
|
public class KaZaGUI extends JFrame
|
|
{
|
|
private JButton m_browseButton;
|
|
private JButton m_connectButton;
|
|
|
|
public KaZaGUI()
|
|
{
|
|
super("Josh's KaZa application for CS654!");
|
|
|
|
setDefaultCloseOperation(EXIT_ON_CLOSE);
|
|
setSize(600, 400);
|
|
setVisible(true);
|
|
|
|
Container c = getContentPane();
|
|
JTabbedPane pane = new JTabbedPane();
|
|
c.add(pane);
|
|
|
|
JPanel clientPanel = new JPanel();
|
|
clientPanel.setLayout(new BoxLayout(clientPanel, BoxLayout.Y_AXIS));
|
|
JPanel p = new JPanel();
|
|
p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
|
|
p.add(new JLabel("User name: "));
|
|
p.add(new JTextField());
|
|
clientPanel.add(p);
|
|
p = new JPanel();
|
|
p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
|
|
p.add(new JLabel("Connection speed: "));
|
|
p.add(new JTextField());
|
|
clientPanel.add(p);
|
|
p = new JPanel();
|
|
p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
|
|
p.add(new JLabel("Shared folder: "));
|
|
p.add(new JTextField());
|
|
m_browseButton = new JButton("...");
|
|
p.add(m_browseButton);
|
|
clientPanel.add(p);
|
|
clientPanel.add(Box.createVerticalGlue());
|
|
clientPanel.add(new Box.Filler(new Dimension(0, 0),
|
|
new Dimension(0, Short.MAX_VALUE),
|
|
new Dimension(Short.MAX_VALUE,
|
|
Short.MAX_VALUE)));
|
|
p = new JPanel();
|
|
p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
|
|
m_connectButton = new JButton("Connect");
|
|
p.add(m_connectButton);
|
|
clientPanel.add(p);
|
|
pane.add("Client", clientPanel);
|
|
|
|
JPanel transferPanel = new JPanel(new BorderLayout());
|
|
pane.add("Transfers", transferPanel);
|
|
|
|
JPanel serverPanel = new JPanel(new BorderLayout());
|
|
pane.add("Server", serverPanel);
|
|
}
|
|
|
|
public void run()
|
|
{
|
|
}
|
|
}
|