bigger GUI, transfers panel merged into client tab
git-svn-id: svn://anubis/gvsu@63 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
afba8a711a
commit
4915272ada
@ -27,8 +27,7 @@ public class KaZaGUI extends JFrame
|
||||
private JPanel m_searchResultsPanel;
|
||||
private JScrollPane m_searchResultsScrollPane;
|
||||
private JList m_searchResultsList;
|
||||
|
||||
/* transfer tab components */
|
||||
private JPanel m_transfersPanel;
|
||||
private JTextArea m_transfersTextArea;
|
||||
|
||||
/* server tab components */
|
||||
@ -44,7 +43,7 @@ public class KaZaGUI extends JFrame
|
||||
super("Josh's KaZa application for CS654!");
|
||||
|
||||
setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||
setSize(600, 400);
|
||||
setSize(700, 600);
|
||||
setVisible(true);
|
||||
|
||||
m_handler = new ActionEventHandler(this);
|
||||
@ -56,9 +55,6 @@ public class KaZaGUI extends JFrame
|
||||
JPanel clientPanel = getClientPanel();
|
||||
pane.add("Client", clientPanel);
|
||||
|
||||
JPanel transferPanel = getTransferPanel();
|
||||
pane.add("Transfers", transferPanel);
|
||||
|
||||
JPanel serverPanel = getServerPanel();
|
||||
pane.add("Server", serverPanel);
|
||||
|
||||
@ -283,12 +279,24 @@ public class KaZaGUI extends JFrame
|
||||
m_searchResultsPanel = new JPanel();
|
||||
m_searchResultsPanel.setLayout(new BoxLayout(m_searchResultsPanel,
|
||||
BoxLayout.X_AXIS));
|
||||
m_searchResultsPanel.setBorder(
|
||||
BorderFactory.createTitledBorder("Search Results"));
|
||||
m_searchResultsList = new JList();
|
||||
m_searchResultsList.setVisibleRowCount(-1);
|
||||
m_searchResultsScrollPane = new JScrollPane(m_searchResultsList);
|
||||
m_searchResultsScrollPane.setPreferredSize(new Dimension(Short.MAX_VALUE,
|
||||
Short.MAX_VALUE));
|
||||
m_searchResultsPanel.add(m_searchResultsScrollPane);
|
||||
m_transfersPanel = new JPanel();
|
||||
m_transfersPanel.setLayout(new BoxLayout(m_transfersPanel,
|
||||
BoxLayout.X_AXIS));
|
||||
m_transfersPanel.setBorder(
|
||||
BorderFactory.createTitledBorder("Transfers"));
|
||||
m_transfersTextArea = new JTextArea();
|
||||
m_transfersTextArea.setEditable(false);
|
||||
JScrollPane jsp = new JScrollPane(m_transfersTextArea);
|
||||
jsp.setPreferredSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));
|
||||
m_transfersPanel.add(jsp);
|
||||
|
||||
JPanel clientPanel = new JPanel();
|
||||
clientPanel.setLayout(new BoxLayout(clientPanel, BoxLayout.Y_AXIS));
|
||||
@ -325,6 +333,7 @@ public class KaZaGUI extends JFrame
|
||||
p.add(m_searchButton);
|
||||
clientPanel.add(p);
|
||||
clientPanel.add(m_searchResultsPanel);
|
||||
clientPanel.add(m_transfersPanel);
|
||||
|
||||
p = new JPanel();
|
||||
p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
|
||||
@ -342,26 +351,6 @@ public class KaZaGUI extends JFrame
|
||||
return clientPanel;
|
||||
}
|
||||
|
||||
private JPanel getTransferPanel()
|
||||
{
|
||||
m_transfersTextArea = new JTextArea();
|
||||
m_transfersTextArea.setEditable(false);
|
||||
|
||||
JPanel transferPanel = new JPanel();
|
||||
transferPanel.setLayout(new BoxLayout(transferPanel, BoxLayout.Y_AXIS));
|
||||
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_transfersTextArea);
|
||||
jsp.setPreferredSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));
|
||||
transferPanel.add(jsp);
|
||||
return transferPanel;
|
||||
}
|
||||
|
||||
private JPanel getServerPanel()
|
||||
{
|
||||
m_serverStatusLabel = new JLabel();
|
||||
|
Loading…
x
Reference in New Issue
Block a user