Difference between awt ang Swing Interview Question n other Question

hi every one i use to think that i know java atlest so much that i can crack a lolcal comp interview but ........................
i ansered few Question but was speachlees when was asked few of this i do not remember all of them
1] difference between awt and swing.
2]System.out.println();
System is a class out is a variable so who come a variable calling a method.
3]are constractor inherateed in java.

1] difference between awt and swing.AWT is based on an abstraction of platform-specific, heavy-weight components. Swing is written entirely in java.
>
2]System.out.println();
System is a class out is a variable so who come a
variable calling a method.Do you mean how come?
In that case, the answer is simple: Because out is a variable, it can be redirected/compared against, etc much easier
3]are constractor inherateed in java.Kind of a trick question, as the answer is yes and no. Constructors are not inherited, but every constructor in the subclass must call one and exactly one constructor of the superclass

Similar Messages

  • Differences between awt and swing

    Ive written the following code, however Ive implemented the gui in awt rather then swing. Ive been told it hs too be in swing. What is the difference between swing and awt what will I need to change in my program so that its done using swing rather then the awt? Heres the code:
    // pp.java
    // Grant Brown
    // 22/02/02
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    // =========================================================
    // Class: pp
    // This class drives the customer manager. It contains the
    // main method which gets called as soon as this application
    // begins to run.
    // =========================================================
    class pp extends Frame implements ActionListener
    // Container of customer objects
    private Vector customers = new Vector (100);
    // List of names component. (Must specify java.awt in
    // front of List to distinguish the List class in the
    // java.awt package from the List class in the java.util
    // package.)
    private java.awt.List names = new java.awt.List ();
    // Delete and update button components.
    private Button delete;
    private Button update;
    // Default constructor.
    public pp ()
    // Assign "Paper Round Manager" to title bar of frame window.
    super ("Paper Round Manager");
    // Add a listener that responds to window closing
    // events. When this event occurs (by clicking on the
    // close box in the title bar), save customers and exit.
    addWindowListener (new WindowAdapter ()
    public void windowClosing
    (WindowEvent e)
    saveCustomers ();
    System.exit (0);
    // Place an empty label in the north part of the frame
    // window. This is done to correct an AWT positioning
    // problem.
    Label l = new Label ();
    add ("North", l);
    // Place the names component in the center part of the
    // frame window.
    add ("Center", names);
    // Create a panel object to hold four buttons.
    Panel p = new Panel ();
    Button b;
    // Add an Insert button to the Panel object and register
    // the current pp object as a listener for button events.
    p.add (b = new Button ("Insert"));
    b.addActionListener (this);
    // Add a Delete button to the Panel object and register
    // the current pp object as a listener for button events.
    p.add (delete = new Button ("Delete"));
    delete.addActionListener (this);
    // The Delete button should be disabled until there is at
    // least one customer to delete.
    delete.setEnabled (false);
    // Add an Update button to the Panel object and register
    // the current pp object as a listener for button events.
    p.add (update = new Button ("Update"));
    update.addActionListener (this);
    // The Update button should be disabled until there is at
    // least one customer to update.
    update.setEnabled (false);
    // Add a Finish button to the Panel object and register
    // the current customer object as a listener for button events.
    p.add (b = new Button ("Finish"));
    b.addActionListener (this);
    // Add the panel object to the frame window container.
    add ("South", p);
    // Set the background of the frame window container to
    // lightGray
    setBackground (Color.lightGray);
    // Set the size of the frame window container to 400
    // pixels horizontally by 200 pixels vertically.
    setSize (400, 200);
    // Allow the user to resize the frame window.
    setResizable (true);
    // Load all contacts.
    loadCustomers ();
    // Make sure that the frame window is visible.
    setVisible (true);
    public void actionPerformed (ActionEvent e)
    if (e.getActionCommand ().equals ("Delete"))
    delete ();
    else
    if (e.getActionCommand ().equals ("Finish"))
    saveCustomers ();
    System.exit (0);
    else
    if (e.getActionCommand ().equals ("Insert"))
    insert ();
    else
    update ();
    public Insets getInsets ()
    // Return an Insets object that describes the number of
    // pixels to reserve as a border around the edges of the
    // frame window.
    return new Insets (10, 10, 10, 10);
    public static void main (String [] args)
    // Create a new pp object and let it do its thing.
    new pp ();
    private void delete ()
    // Obtain index of selected contact item from the names
    // component.
    int index = names.getSelectedIndex ();
    // If no item was selected, index is -1. We cannot update
    // a contact if no contact item in the names component was
    // selected - because we would have nothing to work with.
    if (index != -1)
    // Remove the contact item from the names component.
    names.remove (index);
    // Remove the Customer object from the contacts Vector
    // object.
    customers.remove (index);
    // If there are no more customers ...
    if (customers.size () == 0)
    delete.setEnabled (false);
    update.setEnabled (false);
    else
    // Make sure that the first contact item in the names
    // list is highlighted.
    names.select (0);
    private void insert ()
    // Create an Insert data entry form to enter information
    // for a new customer.
    DataEntryForm def = new DataEntryForm (this, "Insert");
    // If the bOk Boolean flag is set, this indicates the user
    // exited the form by pressing the Ok button.
    if (def.bOk)
    // Create a Contact object and assign information from
    // the form to its fields.
    Customer temp = new Customer ();
    temp.name = new String (def.name.getText ());
    temp.publication = new String (def.publication.getText ());
    temp.round = new String (def.round.getText ());
    temp.address = new String (def.address.getText ());
    temp.phone = new String (def.phone.getText ());
    // Add a new customer item to the names component.
    names.add (temp.name + ", " + temp.publication);
    // Add the Customer object to the contacts Vector
    // object.
    customers.add (temp);
    // Make sure that the Delete and Update buttons are
    // enabled.
    delete.setEnabled (true);
    update.setEnabled (true);
    // Destroy the dialouge box.
    def.dispose ();
    // Make sure that the first customer item in the names list
    // is highlighted.
    names.select (0);
    // ===========================================================
    // Load all contacts from contacts.dat into the contacts
    // Vector object. Also, make sure that the last name/first
    // name from each contact is combined into a String object and
    // inserted into the names component - as a contact item.
    // ===========================================================
    private void loadCustomers ()
    FileInputStream fis = null;
    try
    fis = new FileInputStream ("Customers.dat");
    DataInputStream dis = new DataInputStream (fis);
    int nCustomers = dis.readInt ();
    for (int i = 0; i < nCustomers; i++)
    Customer temp = new Customer ();
    temp.name = dis.readUTF ();
    temp.publication = dis.readUTF ();
    temp.round = dis.readUTF ();
    temp.address = dis.readUTF ();
    temp.phone = dis.readUTF ();
    names.add (temp.name + ", " + temp.publication);
    customers.add (temp);
    if (nCustomers > 0)
    delete.setEnabled (true);
    update.setEnabled (true);
    catch (IOException e)
    finally
    if (fis != null)
    try
    fis.close ();
    catch (IOException e) {}
    // Make sure that the first contact item in the names list
    // is highlighted.
    names.select (0);
    // ========================================================
    // Save all Customer objects from the customer Vector object
    // to customer.dat. The number of customerss are saved as an
    // int to make it easy for loadCustomers () to do its job.
    // ========================================================
    private void saveCustomers ()
    FileOutputStream fos = null;
    try
    fos = new FileOutputStream ("customers.dat");
    DataOutputStream dos = new DataOutputStream (fos);
    dos.writeInt (customers.size ());
    for (int i = 0; i < customers.size (); i++)
    Customer temp = (Customer) customers.elementAt (i);
    dos.writeUTF (temp.name);
    dos.writeUTF (temp.publication);
    dos.writeUTF (temp.round);
    dos.writeUTF (temp.address);
    dos.writeUTF (temp.phone);
    catch (IOException e)
    MsgBox mb = new MsgBox (this, "PP Error",
    e.toString ());
    mb.dispose ();
    finally
    if (fos != null)
    try
    fos.close ();
    catch (IOException e) {}
    private void update ()
    // Obtain index of selected customer item from the names
    // component.
    int index = names.getSelectedIndex ();
    // If no item was selected, index is -1. We cannot update
    // a customer if no customer item in the names component was
    // selected - because we would have nothing to work with.
    if (index != -1)
    // Obtain a reference to the customer object (from the
    // customers Vector object) that is associated with the
    // index.
    Customer temp = (Customer) customers.elementAt (index);
    // Create and display an update entry form.
    DataEntryForm def = new DataEntryForm (this, "Update",
    temp.name,
    temp.publication,
    temp.round,
    temp.address,
    temp.phone);
    // If the user pressed Ok...
    if (def.bOk)
    // Update the customer information in the customers
    // Vector object.
    temp.name = new String (def.name.getText ());
    temp.publication = new String (def.publication.getText ());
    temp.round = new String (def.round.getText ());
    temp.address = new String (def.address.getText ());
    temp.phone = new String (def.phone.getText ());
    // Make sure the screen reflects the update.
    names.replaceItem (temp.name + ", " + temp.publication,
    index);
    // Destroy the dialouge box.
    def.dispose ();
    // Make sure that the first customer item in the names
    // list is highlighted.
    names.select (0);

    Ive doen pretty much what you said burt now my program isnt working at all. The window comes up but instead of doing something when you click the button it just throws shit loads of exceptions. Heres my abridged code
    // pp.java
    // Grant Brown
    // 22/02/02
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    // =========================================================
    // Class:PP
    // This class drives the Paper Round manager. It contains the
    // main method which gets called as soon as this application
    // begins to run.
    // =========================================================
    class pp extends JFrame implements ActionListener
    // Container of customer objects (one object per customer)
    private Vector customers = new Vector (100);
    // List of names component. (Must specify java.awt in
    // front of List to distinguish the List class in the
    // java.awt package from the List class in the java.util
    // package.)
    private java.awt.List names = new java.awt.List ();
    // Delete and update button components.
    private JButton delete;
    private JButton update;
    // Default constructor.
    public pp ()
    // Assign Contact Manager to title bar of frame window.
    super ("Paper Round Manager");
    // Add a listener that responds to window closing
    // events. When this event occurs (by clicking on the
    // close box in the title bar), save contacts and exit.
    addWindowListener (new WindowAdapter ()
    public void windowClosing
    (WindowEvent e)
    saveCustomers ();
    System.exit (0);
    // Place an empty label in the north part of the frame
    // window. This is done to correct an AWT positioning
    // problem. (One thing that you'll come to realize as
    // you work with the AWT is that there are lots of bugs.)
    JLabel l = new JLabel ();
    getContentPane().add ("North", l);
    // Place the names component in the center part of the
    // frame window.
    getContentPane().add ("Center", names);
    // Create a panel object to hold four buttons.
    JPanel p = new JPanel ();
    JButton b;
    // Add an Insert button to the Panel object and register
    // the current cm object as a listener for button events.
    p.add (b = new JButton ("Insert"));
    b.addActionListener (this);
    // Add a Delete button to the Panel object and register
    // the current cm object as a listener for button events.
    p.add (delete = new JButton ("Delete"));
    delete.addActionListener (this);
    // The Delete button should be disabled until there is at
    // least one contact to delete.
    delete.setEnabled (false);
    // Add an Update button to the Panel object and register
    // the current cm object as a listener for button events.
    p.add (update = new JButton ("Update"));
    update.addActionListener (this);
    // The Update button should be disabled until there is at
    // least one contact to update.
    update.setEnabled (false);
    // Add a Finish button to the Panel object and register
    // the current cm object as a listener for button events.
    p.add (b = new JButton ("Finish"));
    b.addActionListener (this);
    // Add the panel object to the frame window container.
    getContentPane().add ("South", p);
    // Set the background of the frame window container to
    // lightGray (to give a pleasing effect).
    setBackground (Color.lightGray);
    // Set the size of the frame window container to 400
    // pixels horizontally by 200 pixels vertically.
    setBounds (50, 100, 400, 200);
    // Do not allow the user to resize the frame window.
    loadCustomers ();
    // Load all contacts.
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    // Make sure that the frame window is visible.
    setVisible (true);
    public void actionPerformed (ActionEvent e)
    if (e.getActionCommand ().equals ("Delete"))
    delete ();
    else
    if (e.getActionCommand ().equals ("Finish"))
    saveCustomers ();
    System.exit (0);
    else
    if (e.getActionCommand ().equals ("Insert"))
    insert ();
    else
    update ();
    public Insets getInsets ()
    // Return an Insets object that describes the number of
    // pixels to reserve as a border around the edges of the
    // frame window.
    return new Insets (10, 10, 10, 10);
    public static void main (String [] args)
    // Create a new cm object and let it do its thing.
    new pp ();
    private void delete ()
    // Obtain index of selected customer item from the names
    // component.
    int index = names.getSelectedIndex ();
    // If no item was selected, index is -1. We cannot update
    // a contact if no contact item in the names component was
    // selected - because we would have nothing to work with.
    if (index != -1)
    // Remove the customer item from the names component.
    names.remove (index);
    // Remove the Customer object from the contacts Vector
    // object.
    customers.remove (index);
    // If there are no more customers ...
    if (customers.size () == 0)
    delete.setEnabled (false);
    update.setEnabled (false);
    else
    // Make sure that the first contact item in the names
    // list is highlighted.
    names.select (0);
    private void insert ()
    // Create an Insert data entry form to enter information
    // for a new contact.
    DataEntryForm def = new DataEntryForm (this, "Insert");
    // If the bOk Boolean flag is set, this indicates the user
    // exited the form by pressing the Ok button.
    if (def.bOk)
    // Create a Customer object and assign information from
    // the form to its fields.
    Customer temp = new Customer ();
    temp.name = new String (def.name.getText ());
    temp.publication = new String (def.publication.getText ());
    temp.address = new String (def.address.getText ());
    temp.round = new String (def.round.getText ());
    temp.phone = new String
              (def.phone.getText ());
    // Add a new customer item to the names component.
    names.add (temp.publication + ", " + temp.address);
    // Add the Customer object to the contacts Vector
    // object.
    customers.add (temp);
    // Make sure that the Delete and Update buttons are
    // enabled.
    delete.setEnabled (true);
    update.setEnabled (true);
    // Destroy the dialog box.
    def.dispose ();
    // Make sure that the first customer item in the names list
    // is highlighted.
    names.select (0);
    // ===========================================================
    // Load all customers from customers.dat into the customers
    // Vector object. Also, make sure that the last name/first
    // name from each contact is combined into a String object and
    // inserted into the names component - as a contact item.
    // ===========================================================
    private void loadCustomers ()
    FileInputStream fis = null;
    try
    fis = new FileInputStream ("customers.dat");
    DataInputStream dis = new DataInputStream (fis);
    int nCustomers = dis.readInt ();
    for (int i = 0; i < nCustomers; i++)
    Customer temp = new Customer ();
    temp.name = dis.readUTF ();
    temp.publication = dis.readUTF ();
    temp.address = dis.readUTF ();
    temp.round = dis.readUTF ();
    temp.phone = dis.readUTF ();
    names.add (temp.publication + ", " + temp.address);
    customers.add (temp);
    if (nCustomers > 0)
    delete.setEnabled (true);
    update.setEnabled (true);
    catch (IOException e)
    finally
    if (fis != null)
    try
    fis.close ();
    catch (IOException e) {}
    // Make sure that the first customer item in the names list
    // is highlighted.
    names.select (0);
    // ========================================================
    // Save all customer objects from the contacts Vector object
    // to customers.dat. The number of contacts are saved as an
    // int to make it easy for loadCustomers () to do its job.
    // ========================================================
    private void saveCustomers ()
    FileOutputStream fos = null;
    try
    fos = new FileOutputStream ("customers.dat");
    DataOutputStream dos = new DataOutputStream (fos);
    dos.writeInt (customers.size ());
    for (int i = 0; i < customers.size (); i++)
    Customer temp = (Customer) customers.elementAt (i);
    dos.writeUTF (temp.name);
    dos.writeUTF (temp.publication);
    dos.writeUTF (temp.address);
    dos.writeUTF (temp.round);
    dos.writeUTF (temp.phone);
    catch (IOException e)
    MsgBox mb = new MsgBox (this, "PP Error",
    e.toString ());
    mb.dispose ();
    finally
    if (fos != null)
    try
    fos.close ();
    catch (IOException e) {}
    private void update ()
    // Obtain index of selected customer item from the names
    // component.
    int index = names.getSelectedIndex ();
    // If no item was selected, index is -1. We cannot update
    // a customer if no customer item in the names component was
    // selected - because we would have nothing to work with.
    if (index != -1)
    // Obtain a reference to the Customer object (from the
    // customer Vector object) that is associated with the
    // index.
    Customer temp = (Customer) customers.elementAt (index);
    // Create and display an update entry form.
    DataEntryForm def = new DataEntryForm (this, "Update",
    temp.name,
    temp.publication,
    temp.address,
    temp.round,
    temp.phone);
    // If the user pressed Ok...
    if (def.bOk)
    // Update the customer information in the customers
    // Vector object.
    temp.name = new String (def.name.getText ());
    temp.publication = new String (def.publication.getText ());
    temp.address = new String (def.address.getText ());
    temp.round = new String (def.round.getText ());
    temp.phone = new String (def.phone.getText ());
    // Make sure the screen reflects the update.
    names.replaceItem (temp.publication + ", " + temp.address,
    index);
    // Destroy the dialog box.
    def.dispose ();
    // Make sure that the first customer item in the names
    // list is highlighted.
    names.select (0);
    // ========================================================
    // Class: Customer
    // This class describes the contents of a business customer.
    // ========================================================
    class Customer
    public String name;
    public String publication;
    public String address;
    public String round;
    public String phone;
    // ==========================================================
    // Class: DataEntryForm
    // This class provides a data entry form for entering customer
    // information.
    // ==========================================================
    class DataEntryForm extends JDialog implements ActionListener
    // bOk is a boolean flag. When true, it indicates that
    // the Ok button was pressed to terminate the dialog box
    // (as opposed to the Cancel button).
    public boolean bOk;
    // The following components hold the text that the user
    // entered into the visible text fields.
    public JTextField name;
    public JTextField publication;
    public JTextField address;
    public JTextField round;
    public JTextField phone;
    public void actionPerformed (ActionEvent e)
    // If the user pressed the Ok button, indicate this
    // by assigning true to bOk.
    if (e.getActionCommand ().equals ("Ok"))
    bOk = true;
    // Destroy the dialog box and return to the point
    // just after the creation of the DataEntryForm object.
    dispose ();
    public DataEntryForm (JFrame parent, String title)
    // Call the other constructor. The current constructor
    // is used for insert operations. The other constructor
    // is used for update operations.
    this (parent, title, "", "", "", "", "");
    public DataEntryForm (JFrame parent, String title,
    String name, String publication,
    String address, String round,
    String phone)
    // Initialize the superclass layer.
    super (parent, title, true);
    // Choose a grid bag layout so that components can be more
    // accurately positioned. (It looks nicer.)
    setLayout (new GridBagLayout ());
    // Add appropriate first name, last name, phone, fax, and
    // email components to the current DataEntryForm container.
    // (Remember, DataEntryForm is a subclass of Dialog.
    // Dialog is a container. Therefore, DataEntryForm
    // inherits the ability to be a container.)
    addComponent (this, new JLabel ("Name: "), 0, 0, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.name = new JTextField (15);
    addComponent (this, this.name, 1, 0, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    if (title.equals ("Update"))
    this.name.setText (name);
    addComponent (this, new JLabel ("Publications: "), 0, 1, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.publication = new JTextField (15);
    addComponent (this, this.publication, 1, 1, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    if (title.equals ("Update"))
    this.publication.setText (publication);
    addComponent (this, new JLabel ("Address "), 0, 2, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.address = new JTextField (15);
    addComponent (this, this.address, 1, 2, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    if (title.equals ("Update"))
    this.address.setText (address);
    addComponent (this, new JLabel ("Round No "), 0, 3, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.round = new JTextField (15);
    addComponent (this, this.round, 1, 3, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    if (title.equals ("Update"))
    this.round.setText (round);
    addComponent (this, new JLabel ("Phone Number "), 0, 4, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.phone = new JTextField (15);
    addComponent (this, this.phone, 1, 4, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    if (title.equals ("Update"))
    this.phone.setText (phone);
    addComponent (this, new JLabel (""), 0, 5, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    addComponent (this, new JLabel (""), 1, 5, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    JButton b;
    // Add an Ok button to this container.
    addComponent (this, b = new JButton ("Ok"), 0, 6, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    b.addActionListener (this);
    // Add a Cancel button to this container.
    addComponent (this, b = new JButton ("Cancel"), 1, 6, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    b.addActionListener (this);
    // Set the size of the dialog window to 250 pixels
    // horizontally by 200 pixels vertically.
    setSize (250, 200);
    // Do not allow users to resize the dialog window.
    setResizable (false);
    // Make sure that the dialog window is visible.
    setVisible (true);
    private void addComponent (Container con, Component com,
    int gridx, int gridy,
    int gridw, int gridh, int fill,
    int anchor)
    // Get the current layout manager. It is assumed to
    // be a GridBagLayout object.
    LayoutManager lm = con.getLayout ();
    // Create a GridBagConstraints object to make it
    // possible to customize component positioning.
    GridBagConstraints gbc = new GridBagConstraints ();
    // Assign the x and y grid positions.
    gbc.gridx = gridx;
    gbc.gridy = gridy;
    // Assign the number of grid blocks horizontally and
    // vertically that are occupied by the component.
    gbc.gridwidth = gridw;
    gbc.gridheight = gridh;
    // Specify the component's resize policy (fill) and
    // the direction in which the component is positioned
    // when its size is smaller than available space (anchor).
    gbc.fill = fill;
    gbc.anchor = anchor;
    // Set the new constraints that the grid bag layout
    // manager will use.
    ((GridBagLayout) lm).setConstraints (com, gbc);
    // Add the component to the container.
    con.add (com);
    // ===========================================================
    // Class: MsgBox
    // This class displays a message box to the user. The message
    // is usually an error message. The user must press the Ok
    // button to terminate the message box.
    // ===========================================================
    class MsgBox extends JDialog implements ActionListener
    public void actionPerformed (ActionEvent e)
    // Terminate the dialog box in response to the user
    // pressing the Ok button.
    dispose ();
    public MsgBox (JFrame parent, String title, String msg)
    // Initialize the superclass layer.
    super (parent, title, true);
    // Store the msg argument in a Label object and add
    // this object to the center part of the dialog window.
    JLabel l = new JLabel (msg);
    add ("Center", l);
    // Create a Button object and add it to the south part
    // of the dialog window.
    JButton b = new JButton ("Ok");
    add ("South", b);
    // Make the current object a listener to events that
    // occur as a result of the user pressing the Ok
    // button.
    b.addActionListener (this);
    // Make sure that the Ok button has the focus.
    b.requestFocus ();
    // Do not allow users to resize the dialog window.
    setResizable (false);
    // Allow the layout manager to choose an appropriate
    // size for the dialog window.
    pack ();
    // Make sure that the dialog window is visible.
    setVisible (true);
    }

  • Difference between AWT,Swing and swt

    Hello,
    I am giving a seminar about swing in which I need to point out differences between AWT,Swing and SWT(Software Widget Tool).
    I have two questions:
    1)I read that-A heavyweight component is one that is associated with its own native screen resource (commonly known as a peer). A lightweight component is one that "borrows" the screen resource of an ancestor-which makes it lighter.Can anybody explain What native screen resource is and how it is borrowed?
    2)I read that SWT uses native widgets and how can it be better than swing?If it is in what way?

    Use Swing for new projects. AWT is the rendering layer underneath Swing in many cases, and AWT provides utility things like Graphics. SWT is an alternative to Swing which used more native rendering, but actually with Java 6, Swing is using a lot of native rendering.
    Fire up NetBeans and use Matisse. Build an application. Run it under Windows, and then under Linux, and then realize how great it is.

  • What are the differences between Applet and Swings

    Please let me know the differences between Applet and Swings.

    Quit cross-posting.
    http://forum.java.sun.com/thread.jspa?threadID=755100
    http://forum.java.sun.com/thread.jspa?threadID=755099
    http://forum.java.sun.com/thread.jspa?threadID=755006

  • What are the differences between Turn in Final Timesheet and the other option: Send Progress for Selected Tasks?

    Hello,
    The resource filled his/her timesheet in PWA. 
    Now : 
    What are the differences between Turn in Final Timesheet
    and the other option: Send Progress for Selected Tasks?
    Thanks

    You are partially correct and partially wrong.
    Turn
    in Final Timesheet sends
    the timesheet to the Timesheet Manager for Approval
    but task update always goes to Status manger of the task. Taks manager you can see in MPP(insert status manager field then check)
    Yes
    after approval progress will be available in MPP as well as in Projectweb app as % complete . 
    Send
    Progress for Selected Tasks 
    Send progress of selected task to status manager after approval update will be available in both MPP and Projectweb
    app as % complete.
    In Send
    Progress for Selected Tasks Timesheet
    Manager doesn't receive anything in his Approval center
    because all the update directly go to Status manager Approval center.
    Here you have to understand
    that there are two role Timesheet Manager(for timesheet approval) and Status manager(for task
    actual approval) 
    kirtesh

  • Is there a difference between the Ethernet WAN port and the other 3 Ethernet Ports on a Time Capsule?

    As posted previously, my time capsule will not set up properly because I get an IP address conflict pop up window.  Is there a difference between the "Ethernet WAN Port" and the other three ports on the back of the Time Capsule?  I may have the DSL modem hooked into the "Ethernet WAN Port".  Thanks.

    it depends what you want to achieve and what configuration you have on your DSL modem/router.
    Resetting TC and run connection wizard from the Airport utility.
    Post the problems.

  • Difference Between Applet and Swing

    Difference Between Applet and Swing

    The advantages and disadvantages of both applets and Swing are the small fluffy elephants you get inside of every box. They're quite well trained and can skeletonize your neighbors' annoying pets upon command.

  • Difference between panes in swings

    hi evryone
    iam learning swings
    can one explain me the difference between Jrootpane ,Jlayeredpane,jmenubar,jcontentpane,jglasspane

    hi evryone
    iam learning swings
    can one explain me the difference between Jrootpane
    ,Jlayeredpane,jmenubar,jcontentpane,jglasspanehttp://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JRootPane.html
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JLayeredPane.html
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JMenuBar.html
    http://www.google.com/search?hl=en&q=jContentPane&btnG=Search
    you get the idea..

  • Sync Performance difference between AWT & JSP MI application

    Hello,
    I would like to know, if there are any performance differences, when I sync from AWT Smart Sync MI application compared to JSP Smart Sync Mi Application?
    Thanks & regards,
    Purnima

    Hi Purnima,
    the sync logic for the MI AWT client and the JSP client is identical, so the performance is expected to be equal.
    During the sync the "sand clock" page is displayed. This is done in the corresponding UI technology and here a slight differnce of resource consumption is there between AWT and JSP (JSP --> Browser rendering, periodic pull;). The resources consumed by this user interaction (processor time, memory) can not be used for inbound data processing etc. and therefore a slight difference in synchronization performance could come up. Though I do not expect recognizable differences (from an end user perspective...) due to this.
    Rgds Thomas

  • Difference between the design of clusters PCLx and others like RFBLG etc .

    There are a few nagging questions which I was not able to find in the forum hence i have to post a new question.
    I am a little confused about the difference between the different clusters .
    If i start with RFBLG i.e. the cluster for BSEG BSEC etc ,I can see that the tables which are part of this cluster
    can be viewed through different methods like
    1) whr usd list for RFBLG
    2) dd02l table and give the required parameters there
    now when I compare this with another so-called cluster PCL1 if find that PCL1 is not recognized as  a cluster
    and also I am not able to see the same in dd02l table when i give PCL1 and the tabtype as cluster which I was able to see
    for the RFBLG ,there are other tables similar to RFBLG .
    1) SO what is the difference between the RFBLG type of clusters and the PCLx type of cluster
    2) are pclx and rfblg..type of clusters same ?
    3) why does PCL1 shows that it is a transparent table ? where as rfblg shows in a diff way in se11
    4) i know we access data from PCL1 using import and export stmts ,DO OR CAN WE DO THE SAME FOR RFBLG
    5) I found that each and evry cluster table had diff fields ,this was kinda surprising for me as I had been thinking
    that all cluster tables need to follow a certain rule ,SO WHO DECIDES THE FIELDS OF A TABLE CLUSTER ?
    6) PCL1 has the index button enabled ,which again I think is not according to the cluster table rules?how?
    7) I understand that we can save data in form of internal tables in the PCL1 cluster ,can we do the same in RFBLG ?
    8) Can I think on lines that PCL1 and RFBLG type of cluster are two totally different types of data dictionary objects
    and the usage and implementation of both of them is different and that the design and the BASE of both of such objects
    is different .
    I know this is a long list but I am sure that answers to these questions would really require some one who has really really work hard and invested a lot of time in understanding the dictionary system.I am awaiting a few answers ,few hints and a healthy discussion till we get them .
    Thanks ...
    a

    Hello,
    1/
    BSEG is a typical Cluster Table.
    This means that the physical table BSEG does NOT exist in the database, physical data for BSEG is stored in the database (table) cluster RFBLG.
    In ABAP however you can perform selects on BSEG (with all fields from the SAP repository structure, see SE11 on BSEG), during execution the SAP database layer will translate these statements to physical selects in the RFBLG database table, so in ABAP this is transparant.
    More info :
    [http://help.sap.com/saphelp_nw04/helpdata/en/cf/21f083446011d189700000e8322d00/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/cf/21f083446011d189700000e8322d00/content.htm]
    2/
    PCL1, PCL2, ... are normal SAP transparent tables, however in HR they are often called HR cluster table.
    Transparent tables are SAP objects where there is also a database table with the same name that contains the physical data.
    However the PCL tables are somewhat different from normal transparent tables (data is compressed, external programs can not interpret the data, ...).
    This means that in ABAP you can not use simple SQL statements to access data in PCL tables (because of compressed format).
    In stead statements like EXPORT TO DATABASE and IMPORT FROM DATABASE need to be used.
    More info :
    [http://fuller.mit.edu/hr/cluster_tables.html|http://fuller.mit.edu/hr/cluster_tables.html]
    Wim

  • What difference between Jtextfield of Swing and Textfield of awt.

    when we press enter key in a textfield for TextField an action is
    occur than what method is called and tell me JtextField does not
    support enter key action.??
    Plz tell me about public boolean handleEvent(Event e){}.
    Infact i want to display internationlized text in textfield.with
    JTextfield after installing desired font and setting font i hv been succeeded to display in JTextfield what i want but since TextField is OS
    dependent it is showing me ??.Tell me what should i do bcz JTextfield is not giving me action event and TextField of awt is not giving me internationlized text.I want that TextField of awt should display my internationalized text.Tell me what should i do.I hv tried to set console of command prompt by using chcp command.
    thanx

    Add an ActionListener to the JTextField:
    http://java.sun.com/docs/books/tutorial/uiswing/components/simpletext.html#textfield

  • Differences between old JavaFX and the new one: some questions

    Hi,
    I'm coming back to my JavaFX studies after 2/3 months and I see that some things are different.. Now, I have some questions:
    1) I see that javafx.ui was deprecated or rewritten in favor of javafx.ext.swing. Why there are a javafx.application.Frame and a javafx.ext.swing.SwingFrame? Which one should I use?
    2) Neither javafx.application.Frame or SwingFrame has the "*undecorated*" attribute that javafx.ui.Frame has. I got this feature only reimplementing createWindow() function like this:
    function createWindow(): java.awt.Window {
           //this is a trick, because Frame don't has a undecorated attribute.
           var f: java.awt.Window = super.createWindow();
           (f as javax.swing.JFrame).setUndecorated(true);
           return f;
    }Should I report this as a bug/RFE in [http://bugreport.sun.com/bugreport/] ? Where should I report bugs and RFEs to JavaFX?
    3) Why frame's opacity don't work in Linux? Is this a Linux restriction or only a "not yet implemented" feature?
    My java -version:
    java version "1.6.0_10"
    Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b15, mixed mode)
    4) Where is that cool feature that permits me to easily animate in JavaFX doing only x = [1..100] dur 1000? Now, I need to use this more advanced (and more complicated) Timeline object.
    Timeline {
            keyFrames:Timeline [
                    KeyFrame{time  : 0s values: x => 0.0},
                    KeyFrame{time  : 2s values: x =< 180.0 tween Interpolator.LINEAR}
            ]//keyFrames
    }//Timeline;Sorry for the amount of questions.
    TIA,
    Bruno E. Grossi

    The new ones will be substantially faster than yours because it has 8-cores instead of four, a faster Frontside Bus, and faster RAM speed.
    You could use the same RAM, but since the new ones can accommodate a faster RAM module you would cause the machine to run slower by using the slower RAM from your old machine.
    You can use the same hard drives since both machines support SATA drives.
    On the other hand you could just be happy with what you have! It's probably more than you need.

  • What the difference between AirPort Extreme from $99 from the other that cost $199,$299or $399

    I want to but a airpor extreme but what the difference from the AirPort Extreme starting $99 to the other ones that cost $199,$299 or $399

    At $99 you have the Airport Express, $199 the Airport Extreme, $299 a 2TB Time Capsule, and $399 a 3TB Time capsule.  The Airport Express has 100Mb/sec ports and no AC wireless.  The Extreme is gigabit and does AC wireless.  The Time capsule are essentially an Extreme with a built in hard drive for Time Machine backup or general Network Attached Storage.  Read more at the Apple Store.

  • Is there a size difference between iPod Touch 1G home button and other versions of iPod Touch?

    I have an old iPod Touch 1G home button that got stuck. So I bought a new home button to replace it and I'm having trouble fitting it in the hole that I'm replacing. I'm not sure the new button I have is for iPod Touch 1G or for other iTouch versions.
    Does anyone know where I find a video how to replace iPod Touch home button and where can buy the home button if the button I have is not for 1G?

    this is a shop online were you can buy the home button http://www.repairsuniverse.com/ipod-touch-1g-button-replacements.html
    and this is a video telling you how to replace it http://www.youtube.com/watch?v=izf0HLSwL7w

  • About the difference between the AWT components and the swing components

    As we know that an AWT component has a peer, but dose a lightweight component(e.g: a swing component) has also a peer? And could somebody tell me that who and how creates the CLICKED_EVENT when I click a JButton(a swing component), and where the CLICKED_EVENT to go util it was processed by a method like btn_ok_clicked(Event e)? And if I click a Button(an AWT component), what's the difference?
    Thanks a lot!

    The main difference is that AWT are native components, and Swing components are entirely in java written. That's besides the look and feel. There are a lot of other differences between AWT and Swing, and there are better described in the documentation.

Maybe you are looking for