added a scrolled pane for the transfers tab
git-svn-id: svn://anubis/gvsu@50 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
a4bc6d4ebf
commit
0d5e54627a
@ -11,6 +11,7 @@ public class KaZaClient
|
||||
private boolean m_connected = false;
|
||||
private Socket m_socket;
|
||||
private DataOutputStream m_os;
|
||||
private FileServer m_fileServer;
|
||||
|
||||
public KaZaClient(String userName, int kbps,
|
||||
String sharedFolder, String server)
|
||||
@ -47,7 +48,8 @@ public class KaZaClient
|
||||
return;
|
||||
}
|
||||
|
||||
Thread fsThread = new Thread(new FileServer(LISTEN_PORT, m_sharedFolder));
|
||||
m_fileServer = new FileServer(LISTEN_PORT, m_sharedFolder);
|
||||
Thread fsThread = new Thread(m_fileServer);
|
||||
m_connected = true;
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,9 @@ public class KaZaGUI extends JFrame
|
||||
private JScrollPane m_searchResultsScrollPane;
|
||||
private JList m_searchResultsList;
|
||||
|
||||
/* transfer tab components */
|
||||
private JPanel m_transfersPanel;
|
||||
|
||||
/* server tab components */
|
||||
private JLabel m_serverClientsLabel;
|
||||
private JLabel m_serverStatusLabel;
|
||||
@ -286,12 +289,20 @@ public class KaZaGUI extends JFrame
|
||||
|
||||
private JPanel getTransferPanel()
|
||||
{
|
||||
m_transfersPanel = new JPanel();
|
||||
|
||||
JPanel transferPanel = new JPanel();
|
||||
transferPanel.setLayout(new BoxLayout(transferPanel, BoxLayout.Y_AXIS));
|
||||
transferPanel.add(new JLabel("Transfers:"));
|
||||
transferPanel.add(new Box.Filler(new Dimension(0, 0),
|
||||
new Dimension(0, Short.MAX_VALUE),
|
||||
new Dimension(0, Short.MAX_VALUE)));
|
||||
JPanel p = new JPanel();
|
||||
p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
|
||||
p.add(new JLabel("Transfers:"));
|
||||
p.add(new Box.Filler(new Dimension(0, 0),
|
||||
new Dimension(Short.MAX_VALUE, 0),
|
||||
new Dimension(Short.MAX_VALUE, Short.MAX_VALUE)));
|
||||
transferPanel.add(p);
|
||||
JScrollPane jsp = new JScrollPane(m_transfersPanel);
|
||||
jsp.setPreferredSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));
|
||||
transferPanel.add(jsp);
|
||||
return transferPanel;
|
||||
}
|
||||
|
||||
@ -300,7 +311,7 @@ public class KaZaGUI extends JFrame
|
||||
m_serverStatusLabel = new JLabel();
|
||||
m_serverStartButton = new JButton("Start MNH Server");
|
||||
m_serverStartButton.addActionListener(m_handler);
|
||||
m_serverClientsLabel = new JLabel("No Clients");
|
||||
m_serverClientsLabel = new JLabel("Server Not Running");
|
||||
|
||||
JPanel serverPanel = new JPanel();
|
||||
serverPanel.setLayout(new BoxLayout(serverPanel, BoxLayout.Y_AXIS));
|
||||
|
Loading…
x
Reference in New Issue
Block a user