Hi Jim,
Your following code works fine -
import java.awt.*;
import javax.swing.*;
public class
Test extends JFrame {
public Test() {
JLabel bigLabel = new JLabel("Really Big Label");
JLabel.getFont().deriveFont(200.0F));
JPanel panel = new JPanel();
panel.add(bigLabel);
JScrollPane scrollPane = new JScrollPane(panel);
getContentPane().add(scrollPane);
setSize(new Dimension(200, 200));
setVisible(true);
}
public static void main(
String[] s) {
new Test();
}
}
What about if you add the following line in the code:
panel.setLayout(null);
No more scrollpanel when I add that line in my program.
Any idea?
(but it works when you set other type of layout)