Click here to Skip to main content
15,898,222 members
Home / Discussions / Java
   

Java

 
AnswerRe: Weather.com script: create cookie to store zip code Pin
David Skelly13-Apr-10 22:34
David Skelly13-Apr-10 22:34 
Questionsupport for javascript?? Pin
AmbiguousName13-Apr-10 7:51
AmbiguousName13-Apr-10 7:51 
AnswerRe: support for javascript?? Pin
David Skelly13-Apr-10 22:32
David Skelly13-Apr-10 22:32 
Questionruntime exception Pin
pelach111-Apr-10 21:40
pelach111-Apr-10 21:40 
AnswerRe: runtime exception Pin
Nagy Vilmos12-Apr-10 11:19
professionalNagy Vilmos12-Apr-10 11:19 
AnswerRe: runtime exception Pin
TorstenH.12-Apr-10 20:15
TorstenH.12-Apr-10 20:15 
QuestionApplet Button thru HTML Pin
002comp11-Apr-10 19:49
002comp11-Apr-10 19:49 
AnswerRe: Applet Button thru HTML Pin
TorstenH.11-Apr-10 21:11
TorstenH.11-Apr-10 21:11 
Yogesh!

Honestly - you have worked a lot on this, I noticed quit some posts of you.

As much as you have been working with JAVA, you should have noticed at least some GUI-examples. And as you did so, you should have taken notice of the existens of the JPanel.

Java Tutorials[^]


Example with multible JPanels


Please check the JPanel which is mounted in the south-position of the BorderLayout:

public class DynamicTreePanel extends JPanel implements ActionListener {
    private int newNodeSuffix = 1;
    private static String ADD_COMMAND = "add";
    private static String REMOVE_COMMAND = "remove";
    private static String CLEAR_COMMAND = "clear";
    
    private DynamicTree treePanel;

    public DynamicTreePanel() {
        super(new BorderLayout());
        
        //Create the components.
        treePanel = new DynamicTree();
        populateTree(treePanel);

        JButton addButton = new JButton("Add");
        addButton.setActionCommand(ADD_COMMAND);
        addButton.addActionListener(this);
        
        JButton removeButton = new JButton("Remove");
        ....
        
        JButton clearButton = new JButton("Clear");
        ...
        
        //Lay everything out.
        treePanel.setPreferredSize(new Dimension(300, 150));
        add(treePanel, BorderLayout.CENTER);

        JPanel panel = new JPanel(new GridLayout(0,3));
        panel.add(addButton);
        panel.add(removeButton); 
        panel.add(clearButton);
        add(panel, BorderLayout.SOUTH);
    }
    ....
}

I never finish anyth...

GeneralRe: Applet Button thru HTML Pin
002comp11-Apr-10 22:33
002comp11-Apr-10 22:33 
GeneralRe: Applet Button thru HTML Pin
002comp12-Apr-10 0:15
002comp12-Apr-10 0:15 
GeneralRe: Applet Button thru HTML(Solved) Pin
002comp12-Apr-10 1:05
002comp12-Apr-10 1:05 
QuestionLocking the size of window Pin
sangeeta200910-Apr-10 21:31
sangeeta200910-Apr-10 21:31 
AnswerRe: Locking the size of window Pin
Richard MacCutchan11-Apr-10 14:34
mveRichard MacCutchan11-Apr-10 14:34 
AnswerRe: Locking the size of window Pin
TorstenH.11-Apr-10 20:54
TorstenH.11-Apr-10 20:54 
Questionshortest remaining time first Pin
Blackberry8910-Apr-10 2:31
Blackberry8910-Apr-10 2:31 
AnswerRe: shortest remaining time first Pin
Richard MacCutchan11-Apr-10 14:34
mveRichard MacCutchan11-Apr-10 14:34 
GeneralRe: shortest remaining time first Pin
Blackberry8912-Apr-10 11:10
Blackberry8912-Apr-10 11:10 
GeneralRe: shortest remaining time first Pin
TorstenH.12-Apr-10 20:10
TorstenH.12-Apr-10 20:10 
AnswerRe: shortest remaining time first Pin
TorstenH.11-Apr-10 20:59
TorstenH.11-Apr-10 20:59 
Questionencrypting and decrypting an image Pin
glinseynew@gmail.com9-Apr-10 13:55
glinseynew@gmail.com9-Apr-10 13:55 
AnswerRe: encrypting and decrypting an image Pin
Richard MacCutchan11-Apr-10 14:32
mveRichard MacCutchan11-Apr-10 14:32 
QuestionSearch Array Pin
Blackberry899-Apr-10 8:58
Blackberry899-Apr-10 8:58 
AnswerRe: Search Array Pin
Nagy Vilmos9-Apr-10 10:13
professionalNagy Vilmos9-Apr-10 10:13 
GeneralRe: Search Array Pin
Blackberry8910-Apr-10 0:10
Blackberry8910-Apr-10 0:10 
QuestionResizing Button?? Pin
AmbiguousName7-Apr-10 7:51
AmbiguousName7-Apr-10 7:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.