Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Java 

[Release] GUI Frame

Code
import javax.swing.*; // I import the necessary library to do this
public class IllegalSkills {
    public static void main(String[] args)
    {
    JFrame frame = new JFrame("This is a test by IllegalSkills");
    frame.setVisible(true);
    frame.setSize(300,300);
    frame.setDefaultCloseOperation(3);
    frame.setResizable(false);
    }
 }

Let me know if you guys have any problems or need help. <3
(Nov 17, 2017 07:42 PM)IllegalSkills Wrote:  
Code
import javax.swing.*; // I import the necessary library to do this
public class IllegalSkills {
    public static void main(String[] args)
    {
    JFrame frame = new JFrame("This is a test by IllegalSkills");
    frame.setVisible(true);
    frame.setSize(300,300);
    frame.setDefaultCloseOperation(3);
    frame.setResizable(false);
    }
 }

Let me know if you guys have any problems or need help. <3

I feel like your thread lacks any details. Can't tell if this post is a troll
What is that seriously? What the point of this thread.
Nobody uses
Code
setDefaultCloseOperation(3)
unless they know that JFrame.EXIT_ON_CLOSE is equivalent to 3, must be a troll.
Curious, why would you also use Swing when JavaFX is gonna make it obsolete? :D
(Nov 18, 2017 06:22 PM)Aussie Wrote:  Curious, why would you also use Swing when JavaFX is gonna make it obsolete? :D

Swing is so much more simplistic brother even most professional programmers still use swing
(Nov 18, 2017 02:41 AM)matt Wrote:  Nobody uses
Code
setDefaultCloseOperation(3)
unless they know that JFrame.EXIT_ON_CLOSE is equivalent to 3, must be a troll.

Are you implying it's fine to use a magic constant if you know what it refers to? I prefer not having to stop and try to remember what 3 means every time I'm reading through that code  🤦‍♂


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by omar18881Aug 29, 2020 12:20 PM 0 188 Aug 29, 2020 12:20 PM
Last Post: omar18881
[Java] by ProckJul 4, 2018 04:06 PM 1 117 Jul 4, 2018 04:06 PM
Last Post: Aussie
[C] by denn1sFeb 26, 2017 04:56 AM 3 238 Feb 26, 2017 04:56 AM
Last Post: caiveman