Check out example codes for "create java windows application". It will help you in understanding the concepts better.

Code Example 1

yourFrame yourvariable = new yourFrame();
yourvariable.setVisible(true);

Learn ReactJs, React Native from akashmittal.com