Click here to Skip to main content
11,922,026 members (38,113 online)
Rate this:
Please Sign up or sign in to vote.
See more: Java Swing

i am new to java...
now i need to design 1 frame with 2 vertical frames,
in the first frame i should put 1 label followed by drop down again a label with text box
where user can enter text.
in the 2nd frame i should import files from a folder and select...there should be one start button also.
the moment i click on the button selected files should be copied into another folder which can be located in the same or different drivers.
plz guide me....
Posted 21-Apr-13 22:26pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Well i can't give you a full advice on how to work with your files, but as for the 2 vertical frame, i would rather use one frame. I would create a panel in it. To this panel i would give a GridLayout(1,2) (1 row, 2 columns ) and then add two more panels ( internal panels if your prefer ).

Something like this:

public yourClass extends JFrame{

    JFrame myFrame=new JFrame();
    JPanel panelInFrame=new JPanel(new GridLayout(1,2));
    JPanel internalLeftPanel=new JPanel();
    Jpanel internalRightPanel=new JPanel();
    public void initializeWindow(){
             * initialize your window( setSize, setVisible etc.)
             * then...
    void addInternalPanels(){
       //here you could manipulate your labels, buttons etc.


    public static void main(String[] args){
       yourClass program=new yourClass();


I hope you understand.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 493
1 Dave Kreskowiak 285
2 Sergey Alexandrovich Kryukov 243
3 Richard MacCutchan 155
4 ppolymorphe 135
0 OriginalGriff 7,231
1 KrunalRohit 4,530
2 Sergey Alexandrovich Kryukov 3,356
3 George Jonsson 2,865
4 Suvendu Shekhar Giri 2,216

Advertise | Privacy | Mobile
Web02 | 2.8.151120.1 | Last Updated 22 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100