Thread: Java Help.

Results 1 to 2 of 2
  1. #1
    AceKill3r's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Posts
    181
    Reputation
    22
    Thanks
    39
    My Mood
    Aggressive

    Java Help.

    Hey guys, Im new to java. I've searched google 100 thousand times to a soulution for this..

    How do i open a javascript window via a button & have the window show PHP code?

    i want the width=672,height=550

    any answer's are fine

    thanks.

  2. #2
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    JFrame for the window, it's in the uh...javax.swing namespace

    I wrote an overloaded function for you:
    [highlight=java]
    import javax.swing.*;

    public static JFrame createWindow(int width, int height, String title, int x, int y)
    {
    JFrame mainFrame = new JFrame();
    mainFrame.setTitle(title);
    mainFrame.setSize(width, height);
    mainFrame.setVisible(true);
    mainFrame.setLocation(x,y);

    return mainFrame;
    }

    public static JFrame createWindow(int width, int height, String title)
    {
    JFrame mainFrame = new JFrame();
    mainFrame.setTitle(title);
    mainFrame.setSize(width, height);
    mainFrame.setVisible(true);

    return mainFrame;
    }
    [/highlight]

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  3. The Following 2 Users Say Thank You to Jason For This Useful Post:

    AceKill3r (04-01-2011),Lyoto Machida (04-15-2011)