hello,
at the moment im programming a gui but i seem to have some sort of problem.
i cant get a scrollpane in the jpannel and still showing my form that ive created
this is the code i got atm.
anyhelp with fixing the scrollpane in the pannel would be appricieted.
at the moment im programming a gui but i seem to have some sort of problem.
i cant get a scrollpane in the jpannel and still showing my form that ive created
Code:
import javax.swing.*;
import java.awt.*;
import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener;
/**
* Created by IntelliJ IDEA.
* User: -
* Date: 24-jan-2009
* Time: 16:06:02
* To change this template use File | Settings | File Templates.
*/
public class Engine {
private JTabbedPane tabbedPane1;
private JPanel panel1;
private JFormattedTextField formattedTextField1;
private JComboBox comboBox1;
private JFormattedTextField formattedTextField2;
private JFormattedTextField formattedTextField3;
private JComboBox comboBox2;
private JComboBox comboBox3;
private JComboBox comboBox4;
public static void main(String args[]) {
JScrollBar oneJScrollBar = new JScrollBar(JScrollBar.VERTICAL);
JFrame frame = new JFrame("Travian Planner ©[email protected]");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container contentPane = frame.getContentPane();
contentPane.add(oneJScrollBar, BorderLayout.EAST);
frame.setContentPane(new Engine().panel1);
frame.setSize(800, 500);
frame.setVisible(true);
}
}
this is the code i got atm.
anyhelp with fixing the scrollpane in the pannel would be appricieted.