Thread: Adding a Pop Up Frame using a JFrame

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Adding a Pop Up Frame using a JFrame 
    Registered Member
    Pablo's Avatar
    Join Date
    Oct 2007
    Age
    27
    Posts
    808
    Thanks given
    0
    Thanks received
    0
    Rep Power
    91
    Alright, so first off you will need to have a working JFrame, I suggest using XHarveyX's.

    Now that you have done XHarveyX's tutorials;

    Step 1:
    Search for:
    Code:
    	public static void main(String args[]) 
    	{
    		new Gui(args);
            }
    Replace with:
    Code:
    	public static void main(String args[]) 
    	{
    		new Gui(args);
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
                }
            });
    	}
    Step 2:
    Now you must add this static void;

    Code:
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("PopUp");
            //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    
            JLabel emptyLabel = new JLabel("");
            emptyLabel.setPreferredSize(new Dimension(175, 100));
            frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);
    
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        }
    Now, exit save, and compile.

    Wah lah, I will post a tutorial later on how to fix up the pop up.

    Post any errors.
    [Today 09:32 PM] Im An Angel: You didnt have to tell everyone.
    [Today 09:32 PM] Shiver: Ur dick is small stfu
     

  2. #2  
    Member Market Banned Market Banned

    Zee Best's Avatar
    Join Date
    Feb 2007
    Age
    29
    Posts
    3,036
    Thanks given
    24
    Thanks received
    210
    Rep Power
    1171
    Quote Originally Posted by Pablo View Post
    Also NOTE: Exiting the PopUp will exit your client as well.
    Remove this line and it wont.

    Code:
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    I made a mod cp for my old client before


    [Only registered and activated users can see links. ]
     

  3. #3  
    Registered Member
    Pablo's Avatar
    Join Date
    Oct 2007
    Age
    27
    Posts
    808
    Thanks given
    0
    Thanks received
    0
    Rep Power
    91
    Quote Originally Posted by zee_best View Post
    Remove this line and it wont.

    Code:
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    I made a mod cp for my old client before
    I can't believe I didn't catch that myself. Just shows how much of a idiot I am.. Thank you very much.
    [Today 09:32 PM] Im An Angel: You didnt have to tell everyone.
    [Today 09:32 PM] Shiver: Ur dick is small stfu
     

  4. #4  
    ZachHaley
    Guest
    this is like... the easeir GUI stuff ever...
     

  5. #5  
    Lord Dharok
    Guest
    But what if they have a pop up blocker?
     

  6. #6  
    Rukin1


    Rukin1's Avatar
    Join Date
    Apr 2007
    Age
    28
    Posts
    5,003
    Thanks given
    228
    Thanks received
    229
    Discord
    View profile
    Rep Power
    4179
    very sexy thanks
    Spoiler for large sig:


     

  7. #7  
    Lord Dharok
    Guest
    Quote Originally Posted by DHAReauxK View Post
    YOUR NOT FUNNY
    Amg, Who are you?!?!?
     

  8. #8  
    Registered Member
    Pablo's Avatar
    Join Date
    Oct 2007
    Age
    27
    Posts
    808
    Thanks given
    0
    Thanks received
    0
    Rep Power
    91
    Quote Originally Posted by Lord Dharok View Post
    But what if they have a pop up blocker?
    Well, if you that fucking dumb, then just not add it? Also, you aren't funny.
    [Today 09:32 PM] Im An Angel: You didnt have to tell everyone.
    [Today 09:32 PM] Shiver: Ur dick is small stfu
     

  9. #9  
    Registered Member

    Join Date
    Sep 2007
    Posts
    1,394
    Thanks given
    3
    Thanks received
    2
    Rep Power
    323
    Immature, Ontopic nice I Like that, Thank you
     

  10. #10  
    Registered Member
    Pablo's Avatar
    Join Date
    Oct 2007
    Age
    27
    Posts
    808
    Thanks given
    0
    Thanks received
    0
    Rep Power
    91
    Quote Originally Posted by DHAReauxK View Post
    No This Isnt As Funny As You Think Taco Boy D:
    Seriously, do you think that bothers me?
    [Today 09:32 PM] Im An Angel: You didnt have to tell everyone.
    [Today 09:32 PM] Shiver: Ur dick is small stfu
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Tags for this Thread

View Tag Cloud

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