Difference between false and Boolean.FALSE ?

Hello,
can you please tell the difference between false and Boolean.FALSE ?

The trap behind autoboxing is that things work just fine when at least one side of the equation is a primitive. Things turn out unexpected when all of a sudden both sides of the equation happen to be an object:
public class Test {
     public static void main(String[] args){
          boolean bp = false;
          Boolean bo = new Boolean(false);
          Boolean bo2 = new Boolean(false);
          System.out.println("Primitive VS Boolean.FALSE: " + (bp == Boolean.FALSE));
          System.out.println("Primitive VS new object: " + (bp == bo));
          System.out.println("New object VS Boolean.FALSE: " + (bo == Boolean.FALSE));
          System.out.println("new object vs new object 2: " + (bo == bo2));
}Result:
Primitive VS Boolean.FALSE: true
Primitive VS new object: true
New object VS Boolean.FALSE: false
new object vs new object 2: falseTry explaining that in the context of this thread without ever referring to autoboxing specifically. Remember that people find these posts through Google, if you pass out information while hiding the gritty details, it gets confusing.

Similar Messages

  • Difference between dispose and setVisible(false)?

    What is the difference between dispose() and setVisible(false)? The only difference I see is that setVisible(false) and bring a window back by using a true flag, while dispose() cannot. Other than that, they appear to do the same thing.
    If I want to get rid of a window (with no intention of bring it back), which should I use?
    Also, is there a memory advantage to using one or the other?
    Thanks for any responses.

    setVisible just makes it visible or not...the advantage would be that you would not have to constantly spend time creating a new object, downside is it sits in memory until you really need it again.
    dispose will actually tell the gc it's ok to clean up the object...and you would have to make a new one each time you wanted to use it...advantage, frees up ram, disadvantage, takes time to create objects over and over.

  • Difference between "false" and "FALSE" value

    Hello All,
    Many times i have seen that intellisence shows options "true" , "TRUE" , "false" , "FALSE" together.
    Can anyone tell me the difference between lowercase and uppercase value?
    For Example : ActivateOnDefault Property of SPFeature shows these options.
    Thanks in advance.

    there are also True and False options. Inside xml with Sharepoint artifacts (including mentioned feature declaration) all versions should work.
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • Difference between validation and susbstittution with tcodes

    hi all can any body tell me about difference between validation and susbstittution with tcodes
    regars
    sravya

    Hi,
    Settting up the FI Validations
    You can use additional validation to supplement the existing SAP logic to fit you into your businness needs.
    For e.g. to allow postings from company code 0001 to business area AA only.
    GGB0 - To maintain the validations
    Validation - Enter a validation name e.g. VBUS
    Applicaion Area - SAP module e.g. FI
    Calling Point - Dependent upon the application area that is selected.
    0001 - Document Header - validate enteries at document header, e.g BKPF table
    0002 - Line Items - check line item entris within a document, e.g. BSEG table
    0003 - Complete Document - check settings for the whole documents.
    e.g. Validation step 001
    Allowed company code '0001' to post to business area AA only. 'FI00' checks that line item is from FI.
    If checks failed, the error message number 14 is displayed to stop the transaction.
    Prerequisite
    <BSEG> $BUKRS = '0001' AND
    <BKPF> $GLVOR = 'FI00'
    Check
    <BSEG> $GSBER = 'AA'
    Message
    Type E No. 14 - Business Area not allowed for company 0001
    Output fields 1 - BSEG - GSBER 2 - BSEG - BUKRS
    3 - 4
    OB28 - Define Validations for Posting
    CC CallPnt Validation Description Activtn Level
    0001 2 VBUS Business Area Validation 1
    Activtn Level - 0 - Not Active 1 - Activated 2 - Activated for all except batch input
    GGB4 - Manage the activation of all validations in the SAP system.
    Validations, Substitutions, and Rules
    Purpose
    With the validations and substitutions software, you can validate and/or substitute data at the time of entry in the FI-SL System and other SAP Systems.
    Implementation Considerations
    You do not need to change the standard system to customize your validations and substitutions. For each installation, you can define exactly which validations and substitutions are necessary to ensure the integrity of your data.
    Features
    Validation
    In the SAP System, almost all input values are validated by a program or against tables or master files. Since some types of validations cannot be standardized, you can use FI-SL's validations program to create validations for your system.
    With validations, you can check values and combinations of values as they are being entered in the SAP environment. Validation rules are stored in the Rule Manager; as data is entered, the Integration Manager validates the data against the validation rules stored in the Rule Manager. Because data is validated before it is posted, only valid information enters the FI-SL System.
    You define validation rules using Boolean logic. When you define a validation rule, the system checks the validation rule to ensure that it is syntactically correct.
    You can also define the result of breaking the validation rule. For instance, you can specify that a message is issued but the user can continue processing. You can also force the user to correct the error before processing can continue.
    For more information, see Validation or What Are Validations?. For more information on using validations, see Creating a Validation. For more information on Boolean Logic, see Introduction to Boolean Logic.
    Substitution
    Substitution rules are stored in the Rule Manager. When data is entered in the system, it is substituted by the Integration Manager. The Integration Manager calls the Rule Manager. Substitution occurs before the data is posted to the FI-SL databases.
    You define substitution rules using Boolean logic. When you define a substitution rule, the system checks the substitution rule to ensure that it is syntactically correct.
    For more information, see Substitution or What Are Substitutions?. For more information on using substitutions, see Creating a Substitution. For more information on Boolean Logic, see Introduction to Boolean Logic.
    Rules
    A rule is a Boolean expression that you can use as a condition, as a check, or in another rule. Rules enable you to refer to frequently used Boolean statements simply by specifying the rule name.
    The FI-SL Integration Manager uses Boolean logic. When you use Boolean logic and syntax, you can:
    Validate data
    Substitute data
    Select ledgers for posting
    Transfer substitution data to a rollup ledger
    Select report data
    The Rule Manager stores the Boolean rules used to analyze data. The Integration Manager calls the Rule Manager and determines whether entered data should be used. If a Boolean statement is true, an action is taken; if a statement is false, no action is taken.
    Boolean logic is used in the following FI-SL modules:
    Validation
    Substitution
    Ledger selection
    Report Writer
    Rollups
    To use Boolean Logic in one of the functions listed, you create statements that are used as formulas in the FI-SL System. For more information on using Boolean Logic, see Introduction to Boolean Logic or Boolean Logic Statements and Rules.

  • 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);
    }

  • Mapping: Difference between createIf and ifWithoutElse

    Suppose i have some condition based on which i am creating a node. Is there any difference between createIf and ifWithoutElse for creating the node (with or without context change)?

    Hi Mala,
    1. IfWithoutElse is usually used to set the filters in mapping. When If condition is satisfied the value of then is returned in output.
       Else value is depends upon the mapping, i.e. where u want this value ( target or in function)
    2. Createif is used to insert any structuring element in the target structure if it is not present in source.
    To create a condition based node you have to go to CreateIf function as ifWithoutElse is boolean function deals with the true n false status of values and not with node creation.
    Regards,
    Shri
    Reward points if u understood the concept.

  • What is the difference between exists and in

    hi all
    if i have these queries
    1- select ename from emp where ename in ( select ename from emp where empno=10)
    and
    2- select ename from emp where exists ( select ename from emp where empno=10)
    what is the difference between exists and in is that only when i use in i have to bring the field name or what.... i mean in a complex SQL queries is it will give the same answer
    Thanks

    You get two entirely different result sets that may be the same. Haah! What do I mean by that.
    SQL> select table_name from user_tables;
    TABLE_NAME
    BAR
    FOO
    2 rows selected.
    SQL> select table_name from user_tables where table_name in (select table_name from user_tables where table_name = 'FOO');
    TABLE_NAME
    FOO
    1 row selected.
    SQL> select table_name from user_tables where exists(select table_name from user_tables where table_name = 'FOO');
    TABLE_NAME
    BAR
    FOO
    2 rows selected.So, why is this? the WHERE EXISTS means 'if the next is true', much like where 1=1 being always true and 1=2 being always false. In this case, where exists could be TRUE or FALSE, depending on the subquery.
    WHERE EXISTS can be useful for something like testing if we have data, without actually having to return columns.
    So, if you want to see if an employee exists you might say
    SELECT 1 FROM DUAL WHERE EXISTS( select * from emp where empid = 10);
    If there is a row in emp for empid=10, then you get back 1 from dual;
    This is what I call an 'optimistic' lookup because the WHERE EXISTS ends as soon as there is a hit. It does not care how many - only that at least one exists. It is optimistic because it will continue processing the table lookup until either it hits or reaches the end of the table - for a non-indexed query.

  • Difference between getSession() and getSession(true)

    I am new to servlets. I couldn't find any difference between request.getSession()
    and request.getSession(true) methods. Could any one help me plese.
    Thanks.

    I am new to servlets. I couldn't find any difference
    between request.getSession()
    and request.getSession(true) methods. Could
    any one help me plese.
    Thanks.getSession() is a convenience method shortcut for getSession(true). There is no difference. There is a difference between getSession() and getSession(false) though...
    (ie, if getSession(false) will not make a new session if one does not already exist...)

  • Difference between -TlsDomain and -DomainSecureEnabled Parameters for Sendconnectors

    Hi Exchange-Community,
    I just came across with the different possibilties for securing mail flow between Partner companies.
    I'm a little confused by the difference between -TlsDomain and -DomainSecureEnabled. All Whitepapers and tutorials for secured Partner communication refer only to the -DomainSecureEnabled Parameter. (With conjunction of Set-transportConfig -tlssenddomainsecurelist
    etc. of course)
    Can anybody enlight me when I have to use the -TlsDomain Parameter, and what it finally does? 
    Thanks for any response
    Chris

    Hi Chris,
    The DomainSecureEnabled parameter is part of the process to enable mutual Transport Layer Security (TLS) authentication for the domains serviced by this Send connector. Mutual TLS authentication functions correctly only when the following conditions
    are met:
    The value of the DomainSecureEnabled parameter must be $true.
    The value of the DNSRoutingEnabled parameter must be $true.
    The value of the IgnoreStartTLS parameter must be $false.
    The TlsDomain parameter specifies the domain name that the Send connector uses to verify the FQDN of the target certificate when establishing a TLS secured connection.
    This parameter is used only if the TlsAuthLevel parameter is set to DomainValidation.
    A value for this parameter is required if:
    The TLSAuthLevel parameter is set to DomainValidation.
    The DNSRoutingEnabled parameter is set to $false (smart host Send connector).
    For more information about them, please refer to Parameters in Set-SendConnector:
    http://technet.microsoft.com/en-us/library/aa998294(v=exchg.150).aspx
    Thanks,
    Winnie Liang
    TechNet Community Support

  • What is the difference between OEE and OSE

    What is the difference b/w
    Oracle8i Enterprise Edition and Oracle8i Standard Edition?
    Which version I choose to install the Oracle Server?

    The real difference between one and the another one are the options installed in the database. I have a document where you can see in detail what options have one and what options have the another one.
    Which version I choose to install the Oracle Server?
    r.- That is quite related to what options you need for your applications. Options like : partitioning, etc.
    With this view you can see what options are available in your database.
    SQL> select * from v$option;
    PARAMETER VALUE
    Partitioning TRUE
    Objects TRUE
    Real Application Clusters FALSE
    Advanced replication TRUE
    Bit-mapped indexes TRUE
    Connection multiplexing TRUE
    Connection pooling TRUE
    Database queuing TRUE
    Incremental backup and recover TRUE
    y
    PARAMETER VALUE
    Instead-of triggers TRUE
    Parallel backup and recovery TRUE
    Parallel execution TRUE
    Parallel load TRUE
    Point-in-time tablespace recov TRUE
    ery
    Fine-grained access control TRUE
    Proxy authentication/authoriza TRUE
    tion
    PARAMETER VALUE
    Change Data Capture TRUE
    Plan Stability TRUE
    Online Index Build TRUE
    Coalesce Index TRUE
    Managed Standby TRUE
    Materialized view rewrite TRUE
    Materialized view warehouse re TRUE
    fresh
    Database resource manager TRUE
    Spatial TRUE
    PARAMETER VALUE
    Visual Information Retrieval TRUE
    Export transportable tablespac TRUE
    es
    Transparent Application Failov TRUE
    er
    Fast-Start Fault Recovery TRUE
    Sample Scan TRUE
    Duplexed backups TRUE
    Java TRUE
    PARAMETER VALUE
    OLAP Window Functions TRUE
    Block Media Recovery TRUE
    Fine-grained Auditing TRUE
    Application Role TRUE
    Enterprise User Security TRUE
    Oracle Data Guard TRUE
    Oracle Label Security FALSE
    OLAP TRUE
    Heap segment compression TRUE
    Join index TRUE
    Trial Recovery TRUE
    PARAMETER VALUE
    Oracle Data Mining TRUE
    Online Redefinition TRUE
    Streams TRUE
    Very Large Memory TRUE
    File Mapping TRUE
    48 rows selected.
    SQL>
    Joel P�rez

  • Difference between defun and Rule

    Hi all,
    Does anyone know the difference between <defun> and <Rule>? Can <defun> be used to generate a library of methods.. the only thing I think is you have to include the form with all these defun's to call any of those functions.
    Would be nice if <defun> uses the same methodology as most programming languages... local variables are stored on stack, have higher precedence than global variables, their value is lost once the function returns, etc.... This is not the case in <Rule> where it can access the variables in the workflow which calls the rules! + localScope=false is the default value, etc.
    Any other differences? (also validate if the differences I mentioned are correct).
    Thanks,
    Adi.

    Jayant,
    The Implementation Rule is we write required SQL codes and Business rule is more Description about what is the Implementation rule is about. Lets say for an Example CASE WHEN COLUMN='ID' THEN 1 ELSE NULL END so the Business rule can write some thing like this - To check for column value if value is ID then populate as 1 else populate Null.
    Hope this answers your question. If in case you worrying about or thinking should i need to write in Business rule i would say dont worry about it.
    Let me know if you are looking for more information.

  • Difference between void and null?

    wht is da difference between void and null w.r.t java?

    corlettk wrote:
    Why do you care, unless you're implementing a java compiler or JVM?Wow, you sure do suck at helping out in a forum. Why even make this post? You're not helping the OP any, and you made yourself look like a tool.
    To the op:
    Null is java's version of a null value. Java's version is more strict then many other languages, and will not work in a boolean expression or anywhere code expects a real and not null value. It's simply null.
    Void is java's way of declaring no return type on a method. Methods that are void take no 'return' statement and if one is provided will cause a fatal error. The exception to this is using 'return' without a value, which returns control to the caller of the method.
    Observe:
    //this method returns an int
    public int return_int(){
        int value = 5;
        return value;
    //this method does not return an int
    public void return_nothing(){
        int another_value = 123;
        System.out.println("Here's the value: " + return_int());
    //this method does not return anything
    public void nothing_returned(){
        return_nothing();
        return;
        System.out.println("This line never gets printed; the method returned control already!");
    }

  • Difference between FileInputStream and DataInputStream

    Hai everyone,
    I want to know the difference between FileInputStream and DataInutStream.As i am new to this environment i am little bit confused between the two. So i request you to explain the difference with an example so that everything will be clear for me.

    FileInputStream is for reading bytes from a file, as is indicated in the API docs: http://java.sun.com/j2se/1.5.0/docs/api/java/io/FileInputStream.html
    DataInputStream is for reading java primitives (byte, char, short, int, long, float, double, boolean) through some other stream, as is indicated in the API docs: http://java.sun.com/j2se/1.5.0/docs/api/java/io/DataInputStream.html
    If you want to read Java primtives from a file, you'd use them together: FileInputStream fis = new FileInputStream("somefile"); // for reading bytes from the file
    DataInputSeam dis = new DataInputStream(fis); // for interpreting bytes read by fis as Java primitives
    int ii = dis.readInt(); // dis uses fis to read 4 bytes from the file, and interprets them as a Java int You should probably go through this: http://java.sun.com/docs/books/tutorial/essential/io/index.html

  • What's the difference between equals() and compareTo() method

    I'm confused between the two method from String class ,,, what's the main difference between equals() and compareTo() method?

    API docs give quite clear information IMHO
    public boolean equals(Object anObject)
    Compares this string to the specified object. The result is true if and only if the argument is not null and is
    a String object that represents the same sequence of characters as this object.
    public int compareTo(String anotherString)
    Compares two strings lexicographically. ....
    The result is a negative integer if this String object lexicographically precedes the argument string. The
    result is a positive integer if this String object lexicographically follows the argument string. The result is
    zero if the strings are equal; compareTo returns 0 exactly when the equals(Object) method would return
    true. Mike

  • Difference between Null and null?

    What is the difference between null and NULL?
    When is each used?
    Thanks,

    veryConfused wrote:
    There is a null in java, but no NULL. null means no value. However, when assigning value, the following is different:Although the empty String has no special role. Null means, the referential type is not assigned (doesn't refer) to a specific object. The empty String is just another object though, so seeing it or pointing it out as something special when it actually isn't at all (no more special than new Integer(0) or new Object[0]) just adds to the confusion.

Maybe you are looking for

  • TS1567 5th Gen I-Pod Touch not Syncing, does come up on PC.

    My 5th Gen I-Pod Touch no longer connects to I-Tunes, or Microsoft Sync (In my 2013 Ford Focus) through a sync cable. My computer however, does see the I-pod as a external device, and it does charge through the Sync cable. I have reset the I-Pod full

  • Ipod touch 4th gen no sound!

    My Ipod Touch 4th gen has no sound!!!

  • One of Many Hyperlinks not working within Visio 2007 PDF document

    I am using Visio 2007 to publish a PDF document, and am running Acrobat 9.4.  All hyperlinks in this document are to pages within the same single Visio/PDF document (no external links). However, after exporting the Visio document to the Acrobat (PDF

  • Illegal Region Number

    After months of trouble free running, I'm getting "Illegal Region Number" error messages popping up with no clue as to which region or any other information. Usually (but not always) it happens when I've hit stop after recording an audio track. It do

  • How to change output resolution?

    Hi! I have a 13" MacBook Pro, and am using the Dr. Bott Mini DisplayPort to HDMI Adapter Pro with Optical Audio to connect to my Samsung LE22B47 TV. The resolution of the TV is 1366x768, but the best output resolution for it my Mac offers is 1344x756