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

12y 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.


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


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.


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

a 540 difference


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 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.