Java JFrame example: How to display a JFrame
Briefly

Those are pretty much the minimal lines of code you need to construct and display a JFrame that (a) has the size you intended and (b) the user can close by selecting a quit/exit operation.
Note that the proper way to display a JFrame is by using the SwingUtilities invokeLater method to make sure this 'job' is placed on the Event Dispatch Thread (EDT).
Read at Alvinalexander
[
add
]
[
|
|
]