GUI better
git-svn-id: svn://anubis/gvsu@23 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
39b6c90811
commit
0804d210f0
@ -4,19 +4,50 @@ 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(400, 400);
|
||||
setSize(600, 400);
|
||||
setVisible(true);
|
||||
|
||||
Container c = getContentPane();
|
||||
JTabbedPane pane = new JTabbedPane();
|
||||
c.add(pane);
|
||||
|
||||
JPanel clientPanel = new JPanel(new BorderLayout());
|
||||
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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user