Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 327 Vote(s) - 3.64 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Release] GUI Frame

#1

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Let me know if you need help.
Reply

#2
Please use proper indentation when posting code. It doesn't really matter for these few lines but larger parts of code will become ugly and hard to read without proper indentation.

This post could have been way better if you would have explained some of the methods JFrame offers instead of just posting some basic code that's as simple as a "Hello World!".
Why would you add a comment explaining you are importing the necessary lib when you don't add comments to the other stuff that's probably new for the target group of this thread?
I assume this code is supposed to help people that are new to GUIs so I'd assume they already know what import does while they probably have no clue about the methods JFrame offers.

The setVisible() method should actually be one of the last methods you are calling in your main method so your form won't show up before it managed to set all the properties like its size.
It doesn't really matter in such a small application but imagine your application getting stuck at some point.
For example querying something from a webserver in the same thread could cause a delay that causes the previously mentioned problem.
You might see the GUI with displaced controls and a wrong size while the application is working on the current task which will look very ugly.

Thanks for sharing that piece of code tho.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through