scrollpane jpanel hlep needed

Joined
Jan 24, 2009
Messages
1
Reaction score
0
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


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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,008
Latest member
HaroldDark

Latest Threads

Top