

void setJMenuBar(JMenuBar menubar) – Menubar for JFrame can be set by using this method.Ģ5. void setIconImage(Image img) – Icon for the window frame can be set by using this method.Ģ4. void setGlassPane(Component glassPane) – glassPane property can be set by using this method.Ģ3. void setDefaultCloseOperation(int operation) – Default operation set by this method which will happen when the user initiates the close operation for a Frame.Ģ2. void setContentPane(Container contentPane) – Property of the contentPane is set by this method.Ģ1. void repaint(long time, int x, int y, int width, int height) – This method is used to repaint the specific rectangle inside of the component in few milliseconds.Ģ0. void remove(Component comp) – For removing the specific component from JFrame container we can use this method.ġ9. TransferHandler getTransferHandler() – This method gets the transferHandler property.ġ8. static boolean isDefaultLookAndFeelDecorated() – If the newly created JFrames have their Window decorations as provided by the current look and feel then this method returns true.ġ7. void setRootPaneCheckingEnabled(boolean enabled) – This one sets calls to add & setLayout are forwarded to the contentPane or not.ġ6. void setRootPane(JRootPane root) – This method sets the rootPane Property.ġ5. void processWindowEvent(WindowEvent e) – This method process the window event occurred on the window component.ġ4. String paramString() – This method returns JFrame in the form of String.ġ3. boolean isRootPaneCheckingEnabled() – Calls to add & setLayout are forwarded to contentPane or not is validated by this methodġ2. void frameInit() – It is called by the constructor to initialize the JFrame.ġ1. JRootPane createRootPane() – Create the default rootPane & called by the constructor.ġ0.

addImpl(Component comp, Object constraints, int index) – This method adds the specified child element for this frame.ĩ. JRootPane getRootPane() – The rootPane object is returned by this method.īelow given methods access modifier “protected” need to be added at the start of the method –Ĩ.

JLayeredPane getLayeredPane() – LayeredPane object is returned by this method.ħ. JMenuBar getJMenuBar() – Menubar set created at the Frame by using this method.Ħ. int getDefaultCloseOperation() – When the user clicks on the close button on this Frame then this method returns the operation.ĥ. Component getGlassPane() – This method creates the glassPane object for JFrame.Ĥ. Container getContentPane() – This method creates the JFrame’s contentPane object.ģ. AccessibleContext getAccessibleContext() – This method gets the accessible context that remains associated with the JFrame.Ģ.

JFrame class provides some methods which play an important role in working with JFrame.ġ.
