Hack Forums
[Java] [Release] GUI Frame - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Java] [Release] GUI Frame (/showthread.php?tid=5754330)



[Release] GUI Frame - IllegalSkills - Nov 17, 2017

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


RE: [Release] GUI Frame - Aussie - Nov 17, 2017

(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


RE: [Release] GUI Frame - eSp0rt - Nov 18, 2017

What is that seriously? What the point of this thread.


RE: [Release] GUI Frame - matt - Nov 18, 2017

Nobody uses
Code
setDefaultCloseOperation(3)
unless they know that JFrame.EXIT_ON_CLOSE is equivalent to 3, must be a troll.


RE: [Release] GUI Frame - Aussie - Nov 18, 2017

Curious, why would you also use Swing when JavaFX is gonna make it obsolete? :D


RE: [Release] GUI Frame - matt - Nov 19, 2017

(Nov 18, 2017 06:22 PM)n31ln3t 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


RE: [Release] GUI Frame - Dialog - Nov 19, 2017

(Nov 18, 2017 02:41 AM)Midnight Blue™ 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  🤦‍♂