java - JFrame does not appear -


i'm using intelij idea platform.

i have following code:

package gui.test;  import javax.swing.*;  public class frame extends jframe{           frame(){}  public void main (string[] args){      new frame(); }  } 

i expected see jframe after compiling code, nothing appeared. kind of problem can be?

frames not visible default--use the

setvisible(true); 

method in order display frames. might want take @ other options such as

setsize(int width, int height); 

method resize frame,

setlocation(int xloc, int yloc); 

to move frame, and

settitle(string title); 

to set title of component.

aside, practice use variable hold components can manipulated when needed.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -