Thread: jframe problem

Results 1 to 4 of 4
  1. #1 jframe problem 
    Registered Member
    Join Date
    Jul 2013
    Posts
    150
    Thanks given
    3
    Thanks received
    4
    Rep Power
    13
    Hello,

    So i am trying to make a custom jframe for my client.
    So i was converting my code from netbeans to eclipse i came with a problem, problem 1:
    So i've
    Code:
    public class Jframe extends client {
    but i need to have it
    Code:
    public class Jframe extends javax.swing.JFrame
    I need both to be "extends", so it can read them both.


    thanks for helping need quick reply thanks!
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jul 2013
    Posts
    150
    Thanks given
    3
    Thanks received
    4
    Rep Power
    13
    bump
    Reply With Quote  
     

  3. #3  
    ಠ_ಠ

    Joshua's Avatar
    Join Date
    May 2010
    Posts
    1,907
    Thanks given
    397
    Thanks received
    708
    Rep Power
    803
    By default the client uses RSFrame (or something similar) which extends Frame. Just change that class to extend JFrame instead and make the changes you want.

    Also, don't name your new class the same as the class you're extending...




    [Only registered and activated users can see links. ]

    Spoiler for Eye Bleach & Recent Releases:



    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]


    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jul 2013
    Posts
    150
    Thanks given
    3
    Thanks received
    4
    Rep Power
    13
    So now i've fixed : "If i run my main class (client.java) it shows my custom jframe".
    But now it doesn't show the actualy client, it doesn't show the loading bar,background etc. Only the custom jframe.

    My main method in my main class ( client.java):
    Code:
    public static void main(String args[]) {
    		try {
    			String args2[]={ "10", "0" ,"highmem" ,"members","32"};
    			String a = ("NoNameYet ");
    			int b = 120*3-43;
    			System.out.println(a + b);
    			if(args2.length != 5) {
    				System.out.println("Usage: node-id, port-offset, [lowmem/highmem], [free/members], storeid");
    				return;
    			}
    			nodeID = Integer.parseInt(args2[0]);
    			//portOff = Integer.parseInt(args[1]);
    			portOff = 0;
    			if(args2[2].equals("lowmem"))
    				setLowMem();
    			else if(args2[2].equals("highmem")) {
    				setHighMem();
    			} else {
    				System.out.println("Usage: node-id, port-offset, [lowmem/highmem], [free/members], storeid");
    				return;
    			}
    			if(args2[3].equals("free"))
    				isMembers = false;
    			else if(args2[3].equals("members")) {
    				isMembers = true;
    			} else {
    				System.out.println("Usage: node-id, port-offset, [lowmem/highmem], [free/members], storeid");
    				return;
    			}
    			signlink.storeid = Integer.parseInt(args2[4]);
    			signlink.startpriv(InetAddress.getLocalHost());
    			new Jframe(args2);
    			//client client1 = new client();
    			//client1.createClientFrame(503, 765);
    		} catch(Exception exception) {
    		}
    	}
    hope this is enough information, thanks
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [474] Jframe problem
    By mige5 in forum Help
    Replies: 6
    Last Post: 05-07-2010, 07:33 PM
  2. Jframe problem.
    By Andys1841 in forum Help
    Replies: 8
    Last Post: 01-30-2010, 09:42 PM
  3. Jframe problem [non-renamed]
    By mige5 in forum Help
    Replies: 4
    Last Post: 12-28-2009, 11:37 AM
  4. Jframe problem
    By Guard1an in forum Help
    Replies: 7
    Last Post: 10-12-2009, 10:08 PM
  5. JFrame problem
    By 35518 in forum Help
    Replies: 10
    Last Post: 03-22-2009, 09:49 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •