added a JScrollPane to vertically scroll content in the main panel

git-svn-id: svn://anubis/gvsu@432 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2009-10-01 23:20:15 +00:00
parent efd4358b2c
commit 327cc8b91d
2 changed files with 11 additions and 6 deletions

View File

@ -11,19 +11,21 @@ import java.util.*;
*/
class RetirementCalculatorPanel extends JPanel implements ActionListener
{
private JButton b;
private RetirementCalculatorModel myModel;
public RetirementCalculatorPanel()
{
setLayout(new BorderLayout());
b = new JButton("Hi There");
b.addActionListener(this);
add("South", b);
JPanel inner = new JPanel(new GridLayout(3, 2));
JButton b = new JButton("HI");
inner.add(b);
JScrollPane scrollpane = new JScrollPane(inner,
ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
add(scrollpane);
}
public void actionPerformed(ActionEvent e)
{
b.setEnabled(false);
}
}

View File

@ -37,13 +37,16 @@ public class RetirementCalculatorModel
private double calculateRetirementFactor()
{
return 0.0;
}
private double calculateSocialSecurity()
{
return 0.0;
}
private double calculateSavingsFactor()
{
return 0.0;
}
}