This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Artima Forums.
Message:
removing the titlebar buttons :
Posted by swapnil on November 16, 2000 at 11:14 AM
hi chia, i have a crude method to help u . let's see if it helps u. The program goes like this. : ............................................................... import java.awt.*; import java.awt.event.*; import javax.swing.*; public class mywindow extends JFrame { public static void main(String[] args) { mywindow m=new mywindow(); } public mywindow() { super("WindowListner Demo"); setSize(400,400); setVisible(true); JButton jb=new JButton("cheek"); Container mycontentpane=getContentPane(); mycontentpane.add(jb); addWindowListener(new abc()); this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); this.setResizable(false); } class abc extends WindowAdapter { public void windowIconified(WindowEvent we) { System.out.println("window is iconinfied");System.out.println(we.getID()); setState(Frame.NORMAL); } } } ............................................................... i don't know what is ur application is meant for , but if u r trying for cancelling the effect of all the three buttons on the title bar then the above program may help you. regards, swapnil
Replies:
|