KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > awt > Frame

java.awt
Class Frame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
JFrame
See Also:
Top Examples, Source Code, Frame(String title, GraphicsConfiguration), Frame(GraphicsConfiguration), displayable, WindowEvent, Window.addWindowListener(java.awt.event.WindowListener)

public void addNotify()
See Also:
removeNotify(), Component.isDisplayable(), Window
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1597]Catch windowClosing event
By Anonymous on 2005/11/04 20:23:08  Rate
java.awt.Frame mainWindow = new java.awt.Frame  ( "Kick Java" ) ; 
 mainWindow.add  ( new JPanel (  )  ) ; 
  
  
 mainWindow.addWindowListener 
  ( new java.awt.event.WindowAdapter  (  )  
  {  
  public void windowClosing 
   ( java.awt.event.WindowEvent ev )  
   {  
      //do something 
      System.exit  ( 0 ) ; 
   }  
  }   ) ; 
  
  
 mainWindow.pack  (  ) ; 
 mainWindow.show  (  ) ; 
 


@Deprecated
public static final int CROSSHAIR_CURSOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


@Deprecated
public static final int DEFAULT_CURSOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


@Deprecated
public static final int E_RESIZE_CURSOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void finalize()
                 throws Throwable
See Also:
Window
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Frame()
      throws HeadlessException
See Also:
Component.setVisible(boolean), Component.setSize(int, int), GraphicsEnvironment.isHeadless()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Frame(GraphicsConfiguration gc)
See Also:
GraphicsEnvironment.isHeadless(), IllegalArgumentException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Frame(String title)
      throws HeadlessException
See Also:
GraphicsConfiguration.getBounds(), Component.setVisible(boolean), Component.setSize(int, int), GraphicsEnvironment.isHeadless()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Frame(String title,
             GraphicsConfiguration gc)
See Also:
GraphicsConfiguration.getBounds(), Component.setVisible(boolean), Component.setSize(int, int), GraphicsEnvironment.isHeadless(), IllegalArgumentException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public AccessibleContext getAccessibleContext()
See Also:
Window, Accessible
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


@Deprecated
public int getCursorType()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int getExtendedState()
See Also:
setExtendedState(int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Frame[] getFrames()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Image getIconImage()
See Also:
setIconImage(Image)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Rectangle getMaximizedBounds()
See Also:
setMaximizedBounds(Rectangle)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public MenuBar getMenuBar()
See Also:
setMenuBar(MenuBar)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int getState()
See Also:
getExtendedState(), setState(int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getTitle()
See Also:
setTitle(String)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


@Deprecated
public static final int HAND_CURSOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int ICONIFIED
See Also:
getExtendedState(), setExtendedState(int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean isResizable()
See Also:
setResizable(boolean)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean isUndecorated()
See Also:
setUndecorated(boolean)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int MAXIMIZED_BOTH
See Also:
getExtendedState(), setExtendedState(int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int MAXIMIZED_HORIZ
See Also:
getExtendedState(), setExtendedState(int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int MAXIMIZED_VERT
See Also:
getExtendedState(), setExtendedState(int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


@Deprecated
public static final int MOVE_CURSOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


@Deprecated
public static final int NE_RESIZE_CURSOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final int NORMAL
See Also:
getExtendedState(), setExtendedState(int)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


@Deprecated
public static final int NW_RESIZE_CURSOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


@Deprecated
public static final int N_RESIZE_CURSOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected String paramString()
See Also:
Container
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void remove(MenuComponent m)
See Also:
Component.add(PopupMenu), MenuContainer
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void removeNotify()
See Also:
addNotify(), Component.isDisplayable(), Container
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


@Deprecated
public void setCursor(int cursorType)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setExtendedState(int state)
See Also:
Toolkit.isFrameStateSupported(int), getExtendedState()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setIconImage(Image image)
See Also:
getIconImage()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[718]Set icon
By Anonymous on 2004/04/05 03:31:33  Rate
// Set icon 
 Image icon = Toolkit.getDefaultToolkit (  ) .getImage ( "icon.gif" ) ; 
 setIconImage ( icon ) ; 
 


public void setMaximizedBounds(Rectangle bounds)
See Also:
getMaximizedBounds()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setMenuBar(MenuBar mb)
See Also:
getMenuBar()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setResizable(boolean resizable)
See Also:
isResizable()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setState(int state)
See Also:
setExtendedState(int), getState()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setTitle(String title)
See Also:
getTitle()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setUndecorated(boolean undecorated)
See Also:
JFrame.setDefaultLookAndFeelDecorated(boolean), Component.isDisplayable(), isUndecorated()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1265]Create a frame without the platform-specific adornments
By Anonymous on 2005/01/20 13:17:06  Rate
// create a frame without the platform-specific adornments 
  
  
 JFrame frame = new JFrame ( "HelloWorld" ) ; 
 frame.setDefaultCloseOperation ( JFrame.EXIT_ON_CLOSE ) ; 
 frame.setUndecorated ( true ) ; 
 frame.setSize ( 300, 100 ) ; 
 frame.setVisible ( true ) ; 
 


@Deprecated
public static final int SE_RESIZE_CURSOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


@Deprecated
public static final int SW_RESIZE_CURSOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


@Deprecated
public static final int S_RESIZE_CURSOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


@Deprecated
public static final int TEXT_CURSOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


@Deprecated
public static final int WAIT_CURSOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


@Deprecated
public static final int W_RESIZE_CURSOR
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags