Difference between implements and extends

Hi all,
what is the difference between implements and extends. i am sorry to ask this silly question, but i am new to JAVA.
Thanks
Balaji

when you extend a class, your class that you are coding inherits every method and field from the extending class. For example:
public class CustomFrame extends JFrame {
//Your class's methods will be in here, but so will all of JFrame's methods.
}You can override (most) methods from extended classes if you want them to do different things than they normally do. The most commonly overriden methods when using swing are stuff like paint(Graphics g). It needs to be overriden to repaint all of the components.
When you imlpement something, you have to specify an interface. Interfaces have methods in them with no code. If you implement an interface, all methods in in must be defined. If not, the code will not compile. Some interfaces like ActionListener extend other classes to perform stuff. The actionPerformed(ActionEvent e) method will perform an action when a button is pressed, etc.

Similar Messages

  • Difference between Implement and Extend

    what is the difference between implements and extends and why do we use them
    thanks,

    classes extend one other class and implement as many
    interfaces as they wish.
    interfaces extend as many interfaces as they wish.But for all that, they both just mean "inherits."
    There wouldn't even have to be two different words, since you never have a choice between X extends Y and X implements Y. For a given X and Y, only one of the two will be legal.

  • Whats the difference between implements and extends!??

    Can an interface be extended or not??
    If it can whats the difference between implements and extends??
    Thank you!

    Code Sample:
    interface a implements aa{This is illegal. An interface cannot implement another interface. It can only extend another interface.
    interface a extends aa{That's the way to do it. As already said above:
    An interface can only extend another interface.
    A class can extend another class.
    A class can implement zero or more interfaces.
    So, "implements" is only used for classes that implement interfaces. For the rest, "extends" is used.

  • Help me clarify: Difference between Joining and Extending Wireless Network

    I've eventually figured out how to get my AirPort Express to allow my Mac Pro access to the internet Via Ethernet cable by joining an existing wireless network. What's the difference between that and extending it? By extending it I loose my ability to use the ethernet to connect to internet on my Mac Pro. Odd thing is though when I initially used AirPort Utility to set up my AirPort Express, I went through all the options to get it configured to access my existing network and I checked option to allow internet access through ethernet. All is well, but then I still don't have access to the internet through the ethernet and I noticed that the setting is on Extended. Just curious why it would give me the option to use the ethernet, set it on extended and not even work.

    I've eventually figured out how to get my AirPort Express to allow my Mac Pro access to the internet Via Ethernet cable by joining an existing wireless network. What's the difference between that and extending it?
    When "joining a network," the AirPort Express Base Station (AX) acts just like any other wireless client (laptop, desktop, printer, etc.) You would want to configure the AX to join a network when you only want to use it to share a USB printer and/or stream iTunes.
    When "extending a network," the AX can perform as either a main, relay, or remote base station in a Wireless Distribution System (WDS). A WDS is primarily used to extend a network wirelessly.
    By extending it I loose my ability to use the ethernet to connect to internet on my Mac Pro.
    If the AX is configured as either a relay/remote base station in a WDS, you actually can use it's Ethernet port for Internet access. Of course, this relay/remote must be connected to a main base station, that itself, has Internet access.

  • What is the difference between Classic and Extended Withholding Tax

    Hi,
    Can some please tell me what is the difference between Classic Withholding and Extended Withholding Tax. How can I look at the Withholding Tax deducted from a particular invoice?
    Number Guaranteed.
    Thanks.

    Dear Prem,
    Withholding tax is the basically a tax withheld during the Vendor payment. So when making the payment to vendor the amount will be deduct (i.e withheld tax)
    from the invoice and paid. The customer is actually the tax to tax authorities.
    you can visit for more info.
    Withholding Tax
    For the config steps you go to the IMG path FI > Financila accounting for the Global settings > Withholding Tax
    Withholding tax configuration is done by FI person.
    Hope this helps you
    Prem

  • What is the difference between WDS and Extending a network?

    What is the difference between the two? Why choose one over the other?

    Both the WDS and "Extend a wireless network setting will add more coverage area to a wireless network.
    WDS must be used if any device on the network is an older "g" device. The downsides to WDS are that it drops the overall wireless speed down to "g" levels (even if there are other newer "n" routers on the network) and cuts the bandwidth capability of the network in half for each "remote" device that is added to the network. That's a really severe loss in performance.
    "Extend a wireless network" is a newer technology that can be used only if all of the routers on the network are newer "n" capable devices. It allows full "n" speeds and imposes only a small bandwidth penalty on the network. Obviously, this is the setup to use if your devices will support the technology.
    Message was edited by: Bob Timmons

  • Difference between INSERT and EXTEND in OBPM Arrays

    Hi all,
    I wanted to know the diference between the EXTEND keyword and INSERT keyword while using OBPM arrays.
    For e.g. if testArray is an Array then:-
    What does testArray.insert mean?
    And
    What does testArray.extend mean?

    Extend inserts at the end of the array. Insert allows you to specify an index into the array where you want to insert to.

  • Difference between "joining" and "extending"

    Just added an airport express to my time capsule network. I realise that if I use the AEx to "extend" my network then the time capsule is relegated to 802.11b/g and not n.
    Is the same true if I just "join" the AEx to the network and use it for iTunes and remote speakers?
    Barry

    Just added an airport express to my time capsule network. I realise that if I use the AEx to "extend" my network then the time capsule is relegated to 802.11b/g and not n.
    Good news! That is not true. 802.11n offers the "extend" feature only between 802.11m base stations.
    If you use WDS you get the same functionality but you are forced to 802.11g.
    Is the same true if I just "join" the AEx to the network and use it for iTunes and remote speakers?
    When the AirPort Express (AX) is configured to join a wireless network it simply acts as just another wireless client. Therefore if the network is using 802.11n the AX will communicate using 802.11n.

  • What's the difference between WDS and Extend Wireless Network?

    Hi,
    I have a situation where my main computer (Mac Pro) is wired to an Extreme (n), and I have an Express (n) in another room in the house to Bridge to other computers for better wireless reception.
    The manuals say I should be connecting the wireless computer via WDS. The way I have it connected right now is as such.
    Extreme:
    Create a wireless network
    Allow this network to be extended is checked
    Express:
    Extend a wireless network
    Allow wireless clients is checked
    Is the above method correct, or should I be setting the Extreme and Express via: Participate in a WDS network?
    Any help would be appreciated.
    Thanks!
    Message was edited by: Imagine
    Message was edited by: Imagine

    I am not an expert on wireless networks but here is what they do in a nut shell:
    WDS is a network composed by access points that work together to expand your network without the need of "wired" connectivity. so one of the bases will be wired, the rest are not , they just relay info to other computers... good for small to medium size business / homes
    EWN is a network composed of wired & wireless networks/access points that work together to expand your network. pretty much you could have 5+ bases plugged in to a LAN / WAN covering different areas of your company / home (long range for medium / big business / Bill Gate's home, etc.).

  • Implementing and Extends

    What is the difference between implements and extends?
    For example, public class Banner extends Applet implements Runnable =>
    If you extend a Class, then you can use the members of the superclass(which is Applet in this situation). And if you implement a Class then you can also use the members of the class. And as far as i know the Class youre implementing is called an interface. I know that an interface is not implemented yet, and it contains a lot of empty methods like public interface Series{ int getNext();  void reset();  void setStart(int x); }   .
    Then if you want to implement this interface you must use another class. In this class you define the methods and also write a couple of variables, whom you will be putting in the not implemented methods, like this=>
    class ByTwos(extends superclass) implements Series {  int start;    int val;   ByTwos(){start=0; val=0;}
    public in getNext(){val +- 2}    public void reset(){start=0; val=0;}  
    public void setStart(int x) {start=x; val=x;}        }.
    Then you create another Class with a main method and an object of type ByTwos, wherein you USE THE MEMBERS OF THE INTERFACE CLASS.
    Are the things i wrote right? What is the difference then?

    Shelby wrote:
    jverd wrote:
    If all the methods defining a type are abstract, you can make the type an interface. An
    interface is very much like a class with all abstract methods. Users of that interface
    don't care which implmentation they get. All they need to know is that they'll be able to
    call the declared methods.Dense people really annoy me, and right now I'm being REALLY dense about the advantage of using
    an interface. I can understand what you say about using an interface to define a type of something
    like an animal. But since all of the variables in an interface are final, and all of the methods are only
    signatures, it seems to me it would just be easier to create classes that use their own methods that
    actually perform a task.You're only thinking of writing the concrete classes. Think about the code that uses the type.
    Animal animal = goGetSomeRandomAnimalFromSomewhere();
    animal.speak();
    animal.feed();I define the Animal type, as an interface, and every user of Animal knows that any Animal (meaning an instance of any class that implements Animal) will be able to speak(), feed(), etc.
    Now I'm making some kind of game with animals wandering around in it. I want to draw some random animal on the screen, have it make its noise and then go eat. At the point where my code is doing that (above), I don't know what specific Animal implementation I'll get, only that it will be an Animal. So I have to declare the animal variable as a supertype of all the classes that could come back.
    The Animal type serves that purpose. It could be an abstract class, rather than an interface, but an abstract class can carry implementation, and my Animal class has no implementation. How does an Animal speak()? How does it feed()? Animal is simply a pure type. Interfaces are better suited for pure type defintions than abstract classes. That's their purpose.
    In addition, my implementing classes can implement other interfaces besides Animal, such as, for instance, Serializable or Comparable. Java doesn't support multiple inheritance of implementation, but it does support multiple inheritance of type--via being able to implement multiple interfaces.
    Remember--inheritance is primarily about type, NOT about code sharing.
    As another example, consider the java.util.List interface. You can add() to a list, remove() from it, see if it contains() a particular element, etc. There are multiple ways you could implement a List, and there's not really any common implementation you'd want to assume. So we define a List interface--the pure type--and then we implement it in very different ways via ArrayList and LinkedList. (Actually, there's a layer or two of abstract classes between List and those implementations. The abstract classes define implementations of some of the methods that do have reasonable defaults--for instance if they only rely on other methods in the List interface.)
    Now I want to do something with a List--say shuffle it or sort it or display its contents in a GUI--I don't care what kind of List you give me. I'm just going to use the methods that all lists provide to perform my operation.
    public void sort(List list) {
      // I can sort ANY List here
    }Now, if you still don't think this makes sense, can you tell me how you'd do this without interfaces?

  • HT1604 Is there any difference between Mac OS Extended Format and ExFat?

    Is there any difference between Mac OS Extended Format and ExFat?  I read in a blog that the ExFat was a good way to format an external drive because it avoided many of the pitfalls of the other formats, as long as it is supported by the operating system.  I tried to format my new Seagate drive, and got an invalid option error.  I was able to format it in Mac OS Extended format.  Can you please tell me if this is similar to ExFat.  Thanks.

    The Mac OS format can only be natively read to and written to by a computer running the Mac OS. This creates a problem if the user wishes his external, or other drive to have seamless compatibility between two different OS's, such as Windows and Mac. Yes, there are software solutions that enable a Windows PC to work with a drive formatted as Mac OS, but it gets complicated if you wish that drive to have compatibility "on the fly" with any PC you may encounter.
    It turns out that the format known as ExFAT is able to be natively read by both a Mac and a PC, without running any additional drivers on either machine. ExFAT also doesn't have some of the limitations of FAT32, which both OS's will also read/write.
    ExFAt is not perfect though. Formatting the drive as Mac OS Extended has some advantages on a Mac. First, it is the only format that permits all functionality of the Mac OS, such as using the drive for Time Machine.
    ExFAt is often thought of as the best middleground for an external partition/drive that needs to have easy cross platform compatibility between a Mac and  PC running Vista or Windows 7.

  • Difference between implementation guide and user guide.

    Hi All,
    I am a recent graduate, just wanted to know what is teh Difference between implementation guide and user guide.
    Sorry the question may sound to simple but I am not aware of the aswer.
    Regards,

    Hi,
    The implementation guide is the reference that you need to use to do the functional setup while the user guide covers how the navigation of the module/application and tells you how to use it.
    Thanks,
    Hussein

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

  • Can anybody give me the difference between Catt and Ecatt

    Hi gurus,
    Can any body give me the difference between catt and ecatt.

    Hi,
    I think this is new technology in sap.
    I know little bit of this can u go through this.
    eCATT (extended Computer Aided Test Tool)
    What is eCATT?
    eCATT is an SAP Testing Tool used to automate & test business scenarios in R/3. Each test generates a detailed log that documents the test process and results. If the testing is smooth without any errors, this means that the business scenarios mapped in R/3 are correct. If the test results in error then the problem can be analyzed using the error log that is generated. 
    eCATT enables automatic testing in SAP GUI for Windows and SAP GUI for Java.
    Features of eCATT:
    Following functions can be performed using eCATT:
    Test transactions, reports and scenarios.
    Call BAPIs and function modules.
    Test remote systems.
    Check authorizations (user profiles).
    Test updates (database, applications, GUI).
    Set up customizing tables.
    Test the effect of changes to customizing settings.
    Perform load testing.
    Check system messages.
    Integrated with Test Workbench, so allows proper management of scripts using SCAT transaction.
    Supports CATT migration to eCATT.
    All eCATT Objects are Repository Objects. Therefore one can take advantage of Standard SAP Transport Tools.
    eCATT Objects can easily download & upload in XML with XSD format.
    There can be several versions of Test Scripts, which allows different implementations with different releases.
    The separation of Test Scripts, Test Data & System Data allows for a considerable degree of reuse.
    Why eCATT?
    CATT is no longer supported by SAP for the creation of new developments. Hence all the test scripts developed in CATT are now need to migrate/Update to eCATT. Comparative to manual testing, the following are advantages of using eCATT:
    Due to automation, testing time is reduced to a large extent.
    Due to automation, less manpower is required for testing. This helps financially.
    Due to automation, manual errors are reduced to large extent. Hence results in error free testing. This helps, as no further problems will occur while the usage of R/3 system by end users and hence increases the efficiency.
    Proved to be extremely useful in implementation projects.
    In regression testing, automated test scripts are an ideal method of quickly detecting errors. Automatic test logs make it easy to reproduce test results, enabling fast analysis and planning of further activities, leading to cost savings for the customer.
    Differences between CATT and eCATT?
    Till date, CATT could only be used with the R/3 system. eCATT (which is available with SAP Web Application Server 6.20) covers the automatic testing in SAPGUI for Windows and SAP GUI for Java. For other GUIs and Applications, eCATT provides an interface for external tools. This allows companies to perform automated tests from an SAP system in a complete IT solution landscape across system boundaries. These new options enable complete automation of solution landscapes under standard Windows and Web-based user interfaces- resulting in low-cost operation of an IT Solution.
    eCATT (extended Computer Aided Test Tool)
    eCATT requisites
    Web Application Server (WAS) 6.20 or more.
    SAPGUI 6.20 or more.
    R/3 4.6C or more. (Target system must have sufficient support package level (Details available in SAP Note 519858) or SAP R/3 Enterprise Release 4.7).
    Before creating Test Scripts using eCATT, some system settings need to be done: 
    Maintain table T000.
    1.      Go to transaction SM31
    2.      Enter T000 and chose MAINTAIN.
    3.      In the Change View “Clients”: Overview screen, select the relevant client and choose “Details”
    4.      In the “CATT and eCATT Restrictions” field, select “CATT and eCATT allowed”.
    5.      Click on SAVE. 
    Enabling scripting at the Front-end
    1.      On any SAP GUI screen, choose “Customizing of Local Layout”.
    2.      Choose Options
    3.      Choose “Scripting Tab”
    4.      Select “Enable Scripting”
    5.      Click Apply and then OK. 
    Enabling Scripting on the Application Server
    1.      Go to transaction RZ11.
    2.      On the Maintain Profile Parameters screen, enter sapgui/user_scripting.
    3.       Choose Display.
    4.      If the Current Value is not set to TRUE, then click on Change Value:
    5.      Enter TRUE in the “New Value”.
    6.      Click on SAVE.
    eCATT is an SAP Testing Tool used to automate & test business scenarios in R/3. Each test generates a detailed log that documents the test process and results. If the testing is smooth without any errors, this means that the business scenarios mapped in R/3 are correct. If the test results in error then the problem can be analyzed using the error log that is generated. 
    eCATT enables automatic testing in SAP GUI for Windows and SAP GUI for Java.
    Features of eCATT:
    Following functions can be performed using eCATT:
    Test transactions, reports and scenarios.
    Call BAPIs and function modules.
    Test remote systems.
    Check authorizations (user profiles).
    Test updates (database, applications, GUI).
    Set up customizing tables.
    Test the effect of changes to customizing settings.
    Perform load testing.
    Check system messages.
    Integrated with Test Workbench, so allows proper management of scripts using SCAT transaction.
    Supports CATT migration to eCATT.
    All eCATT Objects are Repository Objects. Therefore one can take advantage of Standard SAP Transport Tools.
    eCATT Objects can easily download & upload in XML with XSD format.
    There can be several versions of Test Scripts, which allows different implementations with different releases.
    The separation of Test Scripts, Test Data & System Data allows for a considerable degree of reuse.
    Why eCATT?
    CATT is no longer supported by SAP for the creation of new developments. Hence all the test scripts developed in CATT are now need to migrate/Update to eCATT. Comparative to manual testing, the following are advantages of using eCATT:
    Due to automation, testing time is reduced to a large extent.
    Due to automation, less manpower is required for testing. This helps financially.
    Due to automation, manual errors are reduced to large extent. Hence results in error free testing. This helps, as no further problems will occur while the usage of R/3 system by end users and hence increases the efficiency.
    Proved to be extremely useful in implementation projects.
    In regression testing, automated test scripts are an ideal method of quickly detecting errors. Automatic test logs make it easy to reproduce test results, enabling fast analysis and planning of further activities, leading to cost savings for the customer.
    Reward points if it is helpful.
    Rgds,
    P.Nag

  • What is the difference between WM and EWM.

    hello experts,
    what is  the major differences between WM and EWM?
    if we want go for EWM, do we need seperate license is required or will it be available in the Business Suite?
    will EWM alone can be installed and implemented ?
    thanks in advance.

    EWM is part of the SCM core application, which is included in the SAP business suite. EWM is extended warehouse management, and in addition to all the standard WM functionality it introduces warehouse tasks, warehouse orders, the ability to assign equipment to users and track its movement through the warehouse. For a full list of features and functionality of EWM you can check out:
    [http://help.sap.com/saphelp_scm50/helpdata/en/5f/c69040bca2ef4ae10000000a1550b0/frameset.htm|http://help.sap.com/saphelp_scm50/helpdata/en/5f/c69040bca2ef4ae10000000a1550b0/frameset.htm]

Maybe you are looking for

  • SSRS multi value parameter expansion invalidates query syntax

    These results from from running a demo solution and profiling the server. --- here is the text of the query saved in the report's design --- select * from test_ssl where [who] in(case when @P1 = 'all' then [who] else @P1 end)     and [recid] in(case

  • Problem with Dark Room theme.

    I have created a homepage in iWeb 3.0.1 with the Dark Room theme (web.me.com/jmsuijkerbuijk). Everything looks fine (that is: the way I intended) in Safari 4.0.3 and OmniWeb 5.10.1, incomplete in Opera 10.00 and Camino 1.6.10, and plain terrible in F

  • Running v10.4 (intel) on a UFS formatted system volume

    Hello, My (recently deceased) iBook ran Mac OS X v10.3, and I used to be able to install it onto a UFS formatted system volume. This was very useful to me in my work. My new MacBook with v10.4 doesn't seem to allow this option during the install proc

  • Coherence Application Classloader on Weblogic 12c

    We have a Coherence application that is being deployed as an application to Weblogic application servers using a GAR file. The GAR file contains jar files in the LIB directory which are causing classloader conflicts due to newer versions of the class

  • Security of AppV 5 application

    Hi, Seeing AppV slowely moving from an isolation solution to a more integration / distribution solution i was wondering wether our approach of "what is in a bubble doesnt have to be updated beceause its isolated" is still sound. We have a number of s