JScrollPane not appearing
From: Taras_96 (tagas96_at_hotmail.com)
Date: 11/26/03
- Previous message: John Wheeler: "Custom ComboBox Editor in JTable focus issue"
- Next in thread: Christian Kaufhold: "Re: JScrollPane not appearing"
- Reply: Christian Kaufhold: "Re: JScrollPane not appearing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 25 Nov 2003 17:10:54 -0800
Hi all,
as the subject line appears, the JScrollPane doesn't appear when the
JPanel in its veiw port becomes bigger than the scroll pane. Does
anyone see anything obviously wrong with this code?
JFrame myFrame1 = new JFrame();
Container contentPane1 = myFrame1.getContentPane();
myFrame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
String [] labels = {"Sas","asd", "asdf", "aew"};
Grapher myGrapher = new Grapher(labels);
JScrollPane pane1 = new JScrollPane();
pane1.setViewportView(myGrapher);
contentPane1.add(pane1);
myFrame1.show();
Grapher is a class that extends JPanel and overrides the
paintComponent (Graphics g) method..
Cheers
Taras
- Previous message: John Wheeler: "Custom ComboBox Editor in JTable focus issue"
- Next in thread: Christian Kaufhold: "Re: JScrollPane not appearing"
- Reply: Christian Kaufhold: "Re: JScrollPane not appearing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|