tags:

views:

237

answers:

2

I would like to create a without frame border, maximum button, minimum button and frame icon.

Pls guide me to do that!

+2  A: 

Use

setUndecorated(true);

on your JFrame.

This method can only be called while the frame is not displayable (see JavaDoc).

Peter Lang
Ok.I will set an answer is a accepted answeri fi it solve my problem.Thanks!
Chan Pye
@Peter: How can I make a frame is not displayable?I have created JFrame and added some controls to it by using Netbeans. In main function I code: MyJframe form = new MyJframe();form.setUndecorated(true);form.setVisible(true);But it throw exception
Chan Pye
@Chan - Does the MyJFrame constructor call pack()? That would make the JFrame displayable
willcodejavaforfood
@Chan Pye: Put `setUndecorated(true);` at the beginning of your constructor `MyJframe()`.
Peter Lang
Thank you! I have solved my problem.
Chan Pye
A: 

It is work.Thank you very much.

Dushantha Rathnayake