Results 1 to 5 of 5

Thread: GUI help please

  1. #1
    ravjot28 is offline Member
    Join Date
    Jun 2008
    Posts
    87
    Rep Power
    0

    Default GUI help please

    Hi I am making a project i have manually made the gui without the GUI builder now i have prob in my GUi
    [img]
    Img - MyPicx.com
    [/img]

    I want the radio buttons to be under the text area and i want some margin space at top and bottom so plzz help me

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    8

    Default

    Let's see the code that builds the gui.

  3. #3
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    8

    Default

    There's a whole lot more than the gui code here.
    We're missing some classes:
    Java Code:
    C:\jexp>javac framesrx.java
    framesrx.java:113: cannot find symbol
    symbol  : class Random1
    location: class FramesRx
            int list[]=new Random1().m(l,a);
                           ^
    framesrx.java:460: cannot find symbol
    symbol  : class Final
    location: class FramesRx
            new Final(flag11,correct,incorrect,result);
                ^
    2 errors
    and a main method with some arguments to send in to the constructor:
    Java Code:
        public static void main(String[] args) {
            // String[] q,int l,String name,String phone,String[] info
            String[] q = 
            int x = 
            String name = 
            String phone = 
            String[] info = 
            new FramesRx(q,x,name,phone,info);
        }

  4. #4
    ravjot28 is offline Member
    Join Date
    Jun 2008
    Posts
    87
    Rep Power
    0

    Default

    well i have cleared that portion now

    i have a new query that

    i am calling the launch method with creates frame and i am calling it again and again by first setting the frame visible false

    Now my problem is that there is blinking of frame when one frame closes and another opens can i stop this blinking and make it stable

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    You might want to swap JPanels by using a CardLayout rather than all this swapping of JFrames.

    Some other suggestions:

    1) Your code is somewhat convoluted and some of it appears to have been written using a stream of consciousness technique. This makes it very hard for us to understand and debug. Some techniques that can help you simplify the code includes breaking up this huge class into smaller classes and by greater use of arrays (for instance placing the radio buttons into an array).

    2) Your variable naming convention is somewhat cryptic, and this too makes your code hard for us to understand and for both you and us to debug. Better variable and method names would help out a lot and would make your code self-commenting.

    3) Get rid of static everything except for the main method.

    4) Don't mix AWT and Swing components unless you want to add some unpredictable ugly side effects to your code. This means changing your TextArea to a JTextArea placed into a JScrollPane.

    Much luck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •