answersLogoWhite

0

  1. Frame is part of java.awt package and exists since JDK1.0. JFrame is part of javax.swing package and exists since JDK1.1.3 or something.
  2. Frame extends Window.

    JFrame extends Frame.

  3. You can directly add components to Frame. You add components to JFrame.getContentPane().
  4. JFrame implements javax.swing.RootPaneContainer and javax.accessibility.Accessible interface. Frame does not. By virtue of that JFrame gets all the benefits that you get from JRootPane using a delegation model. e.g. you can set the border on ((JComponent) JFrame.getRootPane()).setBorder(...)
  5. JFrame directly supports javax.swing.JMenuBar.
  6. JFrame supports setting of close operation.
User Avatar

Wiki User

∙ 13y ago

What else can I help you with?

Related Questions

How do you make a GUI Frame java program?

The best way, in my opinion, is to use the class JFrame in the swing package. Simply import java.swing.JFrame and create a new JFrame with the Frame's title as the sole parameter. You will also need to setVisible to true.


What is Java Swing Frame?

A top-level window (i.e., a window that is not contained inside another window) is called a frame in Java. The AWT library has a class, called Frame, for this top level. The Swing version of this class is called JFrame and extends the Frame class. The JFrame is one of the few Swing components that is not painted on a canvas. Thus, the decorations (buttons, title bar, icons, and so on) are drawn by the user's windowing system, not by Swing


John is creating a GUI applicationhe places all components on a jframe without specifying its layoutidentify the layout of the jframe?

The default layout manager for a JFrame's content pane is FlowLayout.


What is the function of adapter in java model?

An Adapter is simply a concrete class which implements all the methods of a Listener interface as empty functions. They are convenience classes made because of the tendency to implement Listeners as anonymous classes. For example, let's say we want to add a Listener to a JFrame to detect a mouse click: // implementing a Listener JFrame frame = new JFrame(); frame.addMouseListener(new MouseListener() { void mouseClicked(MouseEvent e) { // do something here } void mouseEntered(MouseEvent e) { } void mouseExited(MouseEvent e) { } void mousePressed(MouseEvent e) { } void mouseReleased(MouseEvent e) { } }); Note how this has a lot of extra code that does nothing. // implementing an Adapter JFrame frame = new JFrame(); frame.addMouseListener(new MouseAdapter() { void mouseClicked(MouseEvent e) { // do something here } }); Note now how we only need to implement one method. This is much cleaner and easier to read.


How can you position a Java Swing Frame on screen?

The JFrame class itself has only a few methods for changing how frames look. Of course, through the magic of inheritance, most of the methods for working with the size and position of a frame come from the various superclasses of JFrame. The most important methods related to positioning a Frame are: • The setLocation and setBounds methods for setting the position of the frame • The setIconImage method, which tells the windowing system which icon to display in the title bar, task switcher window etc • The setTitle method for changing the text in the title bar • The setResizable method, which takes a boolean to determine if a frame will be resizeable by the user


How do you make login page with java in frame?

To create a login page in Java using a JFrame, you can utilize the Swing library. First, create a new JFrame and set its layout to a suitable manager, like GridLayout or FlowLayout. Add components such as JTextFields for username and password, JLabels for prompts, and a JButton for submission. Implement an ActionListener for the button to handle the login logic, validating user input accordingly.


What is the difference between Taurus firearm 66 frame and 606 frame?

a 540 difference


What is pack method in java programming?

If your talking about when you are packing components in a JFrame for example, something along the syntax of: public static void main(String[] args) { GUIFrame frame = new GUIFrame(); frame.setLocation(100, 100); frame.setTitle("This is a JFrame implementation"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setVisible(true); } If you mean something like this, then the pack() method simply crams all the components together, to make the smallest space in a frame. They can be useful if all you want is that, otherwise options such as the .setSize(int height, int length); are also available for specific sizes.


What is the difference between chassis and frame?

A frame is the skeleton of a car without the mountings, were as a chasis is a mounted frame.


Is there a difference in the body or frame between the 1999 Mercedes e320 and e430?

There is no difference


Difference between frame by frame and tweened animation?

i dont know because i love drake !


What is the difference in static frame and moving frame?

A static frame is a fixed reference point with respect to which motion is described, while a moving frame is a reference point that is in motion relative to the objects being observed. In a static frame, objects appear stationary, while in a moving frame, objects may appear to be moving even if they are stationary in the static frame.

Trending Questions
What is a hard copy output device that produces characters in a manner similar to the way in which numbers appear on football scoreboard? What is the difference between 6m L2 cache and 3m L2 cache? How is an aero plain made? What can you break without even touching? What city is halfway between Evansville IN and Orlando fl? What are the three basic types of application software? Do people with a lot of data often own their own mainframe computers? Why are computers impotant? What is the command to add a user in SAMBA Server? Why did the ironmaster invite the peddler to his house in the story the rat trap? Function of counter register? How much RAM did the Macintosh computer have when it was first released? You're troubleshooting a problem with poor performance over a WAN connections at your office Looking at the smart jack you see the Tx light is blinking green and the Rx light is not illuminated? What software do you want to use to start your home studio fruity loops or pro tools LE? What are opinions on the best tablet computers? Help you uninstall office 2007 blue edition error message The setup controller has encountered a problem during install.Please review the log files for further information on the error? Does PangYa download cause computer viruses? What does role of relationships and support network in promoting the well being of individuals mean? During processing data is stored in which location in computer memory? Why did farmers dump 1000 gallons of milk near Sioux city?