Class ? = new class

Hi,
I am trying to model a simple employee record system for a friend. One feature of this is that from the GUI you can add a new employee. I am having trouble implementing this. I need to create a new instance of the class employee as the program is running.
employee ? = new employee
Except I wont be able to specify ? until the program is running, I thought I could just create a string variable, store a name to that and then create a new object with that name.
private String emp;
emp="dave";
employee emp = new employee
This would create a new employee object called dave. But it does not.
emp would contain a keyboard input.
Any idea how I could do this?

You definitely need a course in java - get Thinking in Java from www.mindview.net - it's a free downloadable book...
Normally you'd create an Employee class with a constructor that accepts a unique way to identify it (a name is not unique - trust me, we have customers with this problem). I'll use the name as an example here though...
  Somewhere up here you've read the name of the employee
  from the user into a string object referred to by a
  variable called employeeName
Employee emp = new Employee(employeeName);That's it... the rest is in how you write the employee class... Here's a simple example...
public class Employee
  private String name;
  public Employee(String name)
    this.name = name;
  public String getName()
    return name;
Talden

Similar Messages

  • Error during creating a new class diagram

    Hi everbody,
    I'm using JDeveloper 10.1.3.3.0 with ADF Faces and Toplink. I'm exposing to an error message in JDeveloper while creating a new class diagram. The error message is shown in dialog and saying "The name of the element can not be set to 'package name' as another element has got the same name in the package". I have controlled the name of the new class diagram. The name is unique in the package. Also I'm creating this new file in the package "tr.com.bilisim.class_diagram" and details part of this error message in dialog also says
    "BME-02002 : The name of the element can not be set to 'class_diagram' as another element has got the same name in the package"
    "BME-02002 : The name of the element can not be set to 'bilisim as another element has got the same name in the package"
    "BME-02002 : The name of the element can not be set to 'com' as another element has got the same name in the package"
    "BME-02002 : The name of the element can not be set to 'tr' as another element has got the same name in the package"
    As I understand from the error message, during creating a new class diagram from 'new file dialog' also tries to create the directories in relevant package (tr.com.bilisim.class_diagram).
    How can I solve this problem? Please urgent help!
    best regards...
    --baris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    -repost
    please urgent
    --barisk                                                                                                                                                                                                                           

  • How can i add custom attributes to a new Class Object using the API ?

    Hello everyone,
    Here is my problem. I just created a subclass of Document using the API (not XML), by creating a ClassObjectDefinition and a ClassObject. Here is the code :
    // doc is an instance of Document
    ClassObject co = doc.getClassObject();
    ClassObjectDefinition cod = new ClassObjectDefinition(ifsSession);
    cod.setSuperclass(co);
    cod.setSuperclassName(co.getName());
    cod.setName("MYDocument");
    ClassObject c = (ClassObject)ifsSession.createSchemaObject(cod);
    Everything seems to be OK since i can see the new class when i use ifsmgr. But my question is : how can i add custom attributes to this new class ? Here is what i tried :
    AttributeDefinition value = new AttributeDefinition(ifsSession);
    value.setAttribute("FOO", AttributeValue.newAttributeValue("bar"));
    c.addAttribute(value);
    But i got the following error message :
    oracle.ifs.common.IfsException: IFS-30002: Unable to create new LibraryObject
    java.sql.SQLException: ORA-01400: impossible d'insirer NULL dans ("IFSSYS"."ODM_ATTRIBUTE"."DATATYPE")
    oracle.ifs.server.S_LibraryObjectData oracle.ifs.beans.LibrarySession.DMNewSchemaObject(oracle.ifs.server.S_LibraryObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.NewSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.createSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    void fr.sword.ifs.GestionDocument.IFSDocument.createDocument(java.lang.String)
    void fr.sword.ifs.GestionDocument.IFSDocument.main(java.lang.String[])
    So, what am i doing wrong ?
    More generally, are we restricted in the types of the attributes ? (for example, would it be possible to add an attribute that would be an inputStream ? Or an object that i have already created ?).
    Any help would be appreciated. Thanks in advance.
    Guillaume
    PS : i'm using Oracle iFS 1.1.9 on NT4 SP6 and Oracle 8.1.7
    null

    Hi Guillaume,
    you're welcome. Don't know exactly, but assume that ATTRIBUTEDATATYPE_UNKNOWN
    is used to check for erronous cases only
    and it shouldn't be used otherwise.
    Creating your own objects could be simply done via
    ClassObject ifsClassObject;
    DocumentDefinition ifsDocDef = new DocumentDefinition(ifsSession);
    // get class object for my very own document
    ifsClassObject = ClassObject.getClassObjectFromLabel(ifsSession, "MYDOCUMENT");
    // set the class for the document i'd like to create
    ifsDocDef.setClassObject(ifsClassObject);
    // set attributes and content for the document...
    ifsDocDef.setAttribute("MYFOO_ATTRIBUTE",....);
    ifsDocDef.setContent("This is the content of my document");
    // create the document...
    PublicObject doc = ifsSession.createPublicObject(ifsDocDef);
    null

  • XMLDecoder , unbound =Class.new(ArrayList, AttributeMap, ConnectionSet);

    hello all i am trying to load an old files of my application
    the files was written ,read using XMLDecoder ,XMLEncoder
    trying to support the old version ,but i am getting some errors
    i can only imagine , that some required classes are not suitable since the version change
    but how can i know exactly witch class and witch method ?
    this is the loading code
    ClassLoader cl = new JARClassLoader();
              ExceptionListener el = new ExceptionListener() {
                   public void exceptionThrown(Exception e) {
                        e.printStackTrace();
                        log.error("XMLDecoder error: " + mes + " -- " + e.getCause());
              XMLDecoder dec = new XMLDecoder(read, null, el, cl);
              Object obj = dec.readObject();///THIS LINE I GET THE ERRORthis is the error i am getting
    java.lang.NoSuchMethodException: <unbound>=Class.new(ArrayList, AttributeMap, ConnectionSet);
         at java.beans.Statement.invoke(Unknown Source)
         at java.beans.Expression.getValue(Unknown Source)
         at com.sun.beans.MutableExpression.getValue(Unknown Source)
         at com.sun.beans.ObjectHandler.getValue(Unknown Source)
         at com.sun.beans.ObjectHandler.endElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
         at javax.xml.parsers.SAXParser.parse(Unknown Source)
         at javax.xml.parsers.SAXParser.parse(Unknown Source)
         at java.beans.XMLDecoder.getHandler(Unknown Source)
         at java.beans.XMLDecoder.readObject(Unknown Source)
         at com.tenlevels.flowlevel.util.ver_1_2_0_load.LoadGraph.loadGraph1(LoadGraph.java:100)
         at com.tenlevels.flowlevel.util.ver_1_2_0_load.LoadGraph.loadGraph(LoadGraph.java:61)
         at com.tenlevels.flowlevel.action.OpenFlow.doAction(OpenFlow.java:86)
         at com.tenlevels.flowlevel.action.ActionRouter.performAction(ActionRouter.java:79)
         at com.tenlevels.flowlevel.action.ActionRouter.access$0(ActionRouter.java:70)
         at com.tenlevels.flowlevel.action.ActionRouter$1.run(ActionRouter.java:64)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    java.lang.NullPointerException
         at org.jgraph.graph.AbstractCellView.getCellAttributes(Unknown Source)
         at org.jgraph.graph.AbstractCellView.refresh(Unknown Source)
         at org.jgraph.graph.GraphLayoutCache.refresh(Unknown Source)
         at org.jgraph.graph.GraphLayoutCache.refresh(Unknown Source)
         at org.jgraph.graph.GraphLayoutCache.insertViews(Unknown Source)
         at org.jgraph.graph.GraphLayoutCache.<init>(Unknown Source)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.beans.Statement.invoke(Unknown Source)
         at java.beans.Expression.getValue(Unknown Source)
         at com.sun.beans.MutableExpression.getValue(Unknown Source)
         at com.sun.beans.ObjectHandler.getValue(Unknown Source)
         at com.sun.beans.ObjectHandler.eval(Unknown Source)
         at com.sun.beans.ObjectHandler.startElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
         at javax.xml.parsers.SAXParser.parse(Unknown Source)
         at javax.xml.parsers.SAXParser.parse(Unknown Source)
         at java.beans.XMLDecoder.getHandler(Unknown Source)
         at java.beans.XMLDecoder.readObject(Unknown Source)
         at com.tenlevels.flowlevel.util.ver_1_2_0_load.LoadGraph.loadGraph1(LoadGraph.java:100)
         at com.tenlevels.flowlevel.util.ver_1_2_0_load.LoadGraph.loadGraph(LoadGraph.java:61)
         at com.tenlevels.flowlevel.action.OpenFlow.doAction(OpenFlow.java:86)
         at com.tenlevels.flowlevel.action.ActionRouter.performAction(ActionRouter.java:79)
         at com.tenlevels.flowlevel.action.ActionRouter.access$0(ActionRouter.java:70)
         at com.tenlevels.flowlevel.action.ActionRouter$1.run(ActionRouter.java:64)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    java.lang.NullPointerException: target should not be null
         at java.beans.Statement.invoke(Unknown Source)
         at java.beans.Expression.getValue(Unknown Source)
         at com.sun.beans.MutableExpression.getValue(Unknown Source)
         at com.sun.beans.ObjectHandler.getValue(Unknown Source)
         at com.sun.beans.ObjectHandler.eval(Unknown Source)
         at com.sun.beans.ObjectHandler.startElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
    ...thank you

    shay_te wrote:
    ClassLoader cl = new JARClassLoader();
              ExceptionListener el = new ExceptionListener() {
                   public void exceptionThrown(Exception e) {
                        e.printStackTrace();
                        log.error("XMLDecoder error: " + mes + " -- " + e.getCause());
              XMLDecoder dec = new XMLDecoder(read, null, el, cl);
              Object obj = dec.readObject();///THIS LINE I GET THE ERROR
    I'd have to start out by saying: look in the API under object. readObject() is not an implemented method. Do you have an extension of Object that contains readObject()?

  • How to add new class to existing DC (Web Dynpro project)

    Hi,
    How can I add new class to an existing DC (Web Dynpro project)?
    I tried adding it using File - New - Other - Java - Class, but after a build of the DC the new class (and its contents    ) was completely removed.
    Then I created a new DC (java project) and created a new class in that DC. This went fine, but I got into problems because of circular referencing between the new & the old DC, so no build was possible.
    This can't be difficult, does somebody knows how to do it?
    My temporary solution is to add the classdefinition to an exisiting .java file. Very ugly.
    Thanks,
    Jeroen

    Hi Jeroen,
    where did you create the class? If the *.java file is placed in the src/packages folder it should not be deleted by a build. (I suspect you created it in the gen_wdp folder?)
    Regards,
    Marc

  • Adding a new class with Creator (really simple problem i think..)

    I added a new class to my project with creator...
    class name is "CambiaNote" and there's a method called Cambia
    tabellaselezionabile is my project(package)
    I tried to run everything but It gave me an error:
    Exception Details:  org.apache.jasper.JasperException
      Error getting property 'cambia' from bean of type tabellaselezionabile.Page1I don't know, but the word cambia don't exists at all in my code... or it is not case sensitive..?
    please help, thanks

    typo: correct Paint() to paint()

  • Creating a new "Class type" in release procedure.

    Hi guys,
    how can I create a new <b>"Class type"</b> in release procedure?

    Hi,
    But I do not know why anyone would create a new batch type for release strategies, it is totally unnecessary and provides no additional options. The class type indicates which objects can be classified and there is already one for release strategies.
    You can create a new class or add characteristics to the existing class used in the release strategy anyway.
    Ther is also NO WAY that two classes can be used in the release strategy and this new class type would not change this either???
    Steve B

  • Creating a new class using a template class

    I am very new to Java.
    I need to make a new class by using a template class that was given to us.
    I go to File / New / Class but cannot find how to select a template class to create a new class.
    Thanks,
    gs

    gs2010 wrote:
    I am very new to Java.
    I need to make a new class by using a template class that was given to us.
    I go to File / New / Class but cannot find how to select a template class to create a new class.
    Thanks,
    gsYou need to be much more specific as to what you are trying to do.
    What is a "template class"?
    How are you trying to "go to" and "select" the template?
    Etc.

  • Creating a new class type in the classification system

    We are wanting to classify objects in a ZTABLE.  We have a home grown system for defining our customer requirements that is used as the way for the sales people to communicate to the engineering dept. what the customer wants.  A new need has come up that seems to be a good fit to be able to classify our customer requirements.  I have been trying to create a new class type that is linked to our ZTABLE.  However, even though it looks like we should be able to do this I have not been able to do it.  I ran across some documentation that seems to imply that adding a new class type used to be possible, but no longer is.
    Can anyone verify that creating a new class type is still possible to do?  We are on ECC 5.0.

    Can someone point me in the right direction as to how to create my own Class Type.  Is there some documentation as to how to dow this? Other than what is fould in SPRO I have tried and tried but no joy for me. 
    This is what I have done so far:
    in SPRO:
    1) Created an Object Key for my table ZLO_CUSTREQ.  This table has a primary key of CRQNR (custormer requirements number which is I created)  The documentation says that I need to add this key field to structure RMCLY (I did that).  BUT, it also says the RMCLY is embeded in structure RMCLX and it is not.  Do I need to modify RMCLX to add RMCLY as an append structure?
    2) Went to Maintain Object types and Class types and selected my table. Double clicked on Class Types in the Dialog Structure tree, which displayed an empty list of class types. 
    I then Clicked New Entries button and filled in the fields: Class type(Z10), Description(Customer Requirements), Table(ZLO_CUSTREQ).  in the Screens group I selected Keywords and Characteristics.  In the Functions group I selected: Standard class type and Multiple classifications. I then Clicked the back arrow.  This returned me to the Class Types list which now displayed my new class type. 
    When I click the save button it kicks me out the the SPRO menu screen and I get the warning message "Class type Z10 does not have the classification status incomplete system" . 
    Then, it won't let me re-enter the Maintain Object types and Class Types screen due to an error "View cluster is already open, go back with F3"
    When I hit F3 I am returned to the main SPRO screen.  After navigating back to the Maintain Object types and Class types I continue to get the View cluster already open error.  The only way I can get back to Maintain Object types and Class types  is to completely exit SPRO and start over.  When I do, class type Z10 is gone.
    I have repeated this procedure several times with always the same results.
    Can anyone please help me?

  • How to add new class in modified template...

    Finally I have encourage myself to scratch to (for me deepest darkwood) templates...
    I have modified original Theme 2 to My theme 2 and added in some tempaltes region my parts-looks promising.
    Now I want to create sidebar region that is 450 px wide.
    It should be the same sidebar region but with different width!
    I saw on file system that there is .css so I add this class in it....(as aspected) it is not shown in template class list...
    I am able to apply that new class to template, but I cannot see that class in "Template Class" LOV (in Edit Region Template form).
    Is that important and could this bee seen in that list?
    THX!

    I have now working template with my new class...
    What is still bothering me is that I have editeted "theme_V2.css" file. I'm plannig to put my app on hosted WEB site in Germany, where this file will not be the same as is on my server.
    How to achieve future compatibilty according this?
    THX!

  • How do you add a new class package?

    Hi guys,
    I have just started using J2SE and I need to add a new class definition. This is to be imported at the start of the program,
    ie. import cs1.Keyboard;
    The thing im not sure of is, how do I make the compiler know where the Keyboard class is? Which directory do I have to put it in?
    If anyone has any idea, it would be really appreciated. Thanks

    Put Keyboard.class in a directory named cs1 and add the parent of cs1 to your CLASSPATH when you compile and run:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html
    MOD

  • Define a new class in CSS for the width in a standard report column

    Hi all,
    I need to give one standard report column a width of 30px. I read anything about this here in the forum. I only know a litte of CSS and HTML. So I tried the following, but it doesn't work.
    I have a own css-file for my application. I tried to define a new class in it:
    div.reportcol30{width:30em;}
    Then I write the following in the report attribute "CSS CLASS" for my column:
    <div class="reportcol30">
    Does anybody have an idea what's wrong?
    Thanks, Daniela

    Dear Denes Hi,
    I tried (display:block;width:500px;overflow:hidden;) in my application, but the problem is that
    the column it self took the new width (500) , but the data row (which is select_list_from_lov)
    still smaller than 500 about 250 what is th problem
    thank you

  • Adding componets to a new class

    I've created a new class for BidFrame Jframe, and would like to get contents from the previous method to use, or even start afresh. But when i declare an item, it still doesn't work. What am i doing wrong? The problem lies in BidFrame extend JFrame....if the code is taken out of the two brackets, everything else works. Please help
    import java.awt.*;
    import java.awt.event.*;
    import java.text.DecimalFormat;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.lang.*;
    public class EasyAuction extends JFrame
         // JPanel for login window
                 private JPanel  biddingJPanel, oneJPanel, welcomeJPanel, registertwoaJPanel;
                 private JLabel titleJLabel, buyernameJLabel, buyerpasswordJLabel, buyerJLabel, sellernameJLabel, sellerpasswordJLabel, sellerJLabel;
                 private JButton buyerJButton, sellerJButton, registeroneJButton, registertwoJButton;
                 private JTextField buyernameJTextField, buyerpasswordJTextField, sellernameJTextField, sellerpasswordJTextField;
                 private JComboBox itemJComboBox;
                 public JPanel BidFrameJFrame;
    //Publics JPanels
    //public JPanel registertwoJFrame;
                //contentPane
                 public Container contentPane, c;
                 //no argument constructor
                 public EasyAuction()
                      createUserInterface();
                 //create and position components
                 private void createUserInterface()
                     //get contentPane
                      contentPane = getContentPane();
                      c = getContentPane();
                   //and set layout to null
                      contentPane.setLayout(null);
                      c.setLayout(null);
                   //goes to public void welcome
                      login();
                      //set properties of applications window
                      setTitle( "Easy Auction" ); // set JFrame's title bar string
                    setSize( 300, 200);   // set width and height of JFrame
                    setVisible( true );    // display JFrame on screen
                 } // end method createUserInterface
                 public void login(){
                           //setup oneJPanel
                           oneJPanel = new JPanel();
                           oneJPanel.setLayout( new FlowLayout() );
                           oneJPanel.setBounds(0,0, 300,200);
                           oneJPanel.setVisible(true);
                         // setup buyernameJLabel
                         buyernameJLabel = new JLabel();
                         buyernameJLabel.setText("Buyer Name");
                         oneJPanel.add( buyernameJLabel );
                         //setup nameJTextField
                         buyernameJTextField = new JTextField(15);
                        buyernameJTextField.
                        setEnabled(true);
                        oneJPanel.add( buyernameJTextField );
                        //setup buyerpasswordJLabel
                        buyerpasswordJLabel = new JLabel();
                        buyerpasswordJLabel.setText("Pass word  ");
                        oneJPanel.add( buyerpasswordJLabel);
                        //setup buyerpasswordJTextField
                        buyerpasswordJTextField = new JTextField(15);
                        buyerpasswordJTextField.setEnabled(true);
                        oneJPanel.add( buyerpasswordJTextField);
                        //setup buyerJLabel
                        buyerJLabel = new JLabel();
                        buyerJLabel.setText("Click on Buyer Button");
                        oneJPanel.add(buyerJLabel);
                        //setup buyerJButton
                        buyerJButton = new JButton ();
                        buyerJButton.setText("Buyer");
                        buyerJButton.setBackground( Color.YELLOW );
                        oneJPanel.add( buyerJButton );
                        buyerJButton.addActionListener(
                             new ActionListener(){
                                  public void actionPerformed( ActionEvent event )
                                       BidFrame f = new BidFrame();
                                   f.setVisible(true);
                        //setup registeroneJButton
                        registeroneJButton = new JButton ();
                        registeroneJButton.setText ("Register");
                        registeroneJButton.setBackground ( Color.ORANGE);
                        oneJPanel.add( registeroneJButton);
                        //setup sellernameJLabel
                        sellernameJLabel = new JLabel();
                        sellernameJLabel.setText("Seller Name");
                        oneJPanel.add( sellernameJLabel);
                        //setup sellernameJTextField
                        sellernameJTextField = new JTextField(15);
                        sellernameJTextField.setEnabled(true);
                        oneJPanel.add(sellernameJTextField);
                        //setup sellerpasswordJLabel
                        sellerpasswordJLabel = new JLabel();
                        sellerpasswordJLabel.setText("Pass word  ");
                        oneJPanel.add( sellerpasswordJLabel );
                        //setup sellerpasswordJTextField
                        sellerpasswordJTextField = new JTextField(15);
                        sellerpasswordJTextField.setEnabled(true);
                        oneJPanel.add( sellerpasswordJTextField );
                        //setup sellerJLabel
                        sellerJLabel = new JLabel();
                        sellerJLabel.setText("Click on Seller Button");
                        oneJPanel.add(sellerJLabel);
                        //setup sellerJButton
                        sellerJButton = new JButton ();
                        sellerJButton.setText("Seller");
                        sellerJButton.setBackground( Color.YELLOW );
                        oneJPanel.add( sellerJButton );
                        //setup registertwoJButton ();
                        registertwoJButton = new JButton ();
                        registertwoJButton.setText("Register");
                        registertwoJButton.setBackground( Color.ORANGE);
                        oneJPanel.add( registertwoJButton );
                        contentPane.add(oneJPanel);
                    return;          
              public class BidFrame extends JFrame
                      oneJPanel.setVisible(false);
                   biddingJPanel = new JPanel ();
         biddingJPanel.setLayout( new FlowLayout() );
              biddingJPanel.setBounds(0, 0, 300,200);
              biddingJPanel.setVisible(true);
              setup itemJComboBox
              itemJComboBox = new JComboBox( );
              biddingJPanel.add (itemJComboBox);
              contentPane.add(biddingJPanel);
              // main method
                 public static void main( String[] args )
                    EasyAuction application = new EasyAuction();
                    application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
                 } // end method main
    }//ends public class Bidding 

    Normally you would use a modal JDialog, not a JFrame, to gather additional information.
    If you need data to display in the dialog then just pass the data when you create the dialog:
    BidDialog dialog = new BidDialog(parameter1, parameter2, ....);
    dialog.setModal( true );
    dialog.setVisible(true);

  • I am looking for educational posters from Apple or for Garageband, if they exist. I'll be teaching a new class for middle school using Garageband next year. Thanks!

    I am looking for educational posters from Apple or for Garageband, if they exist. My school district will be teaching a new class for middle school using Garageband next year. I'd love to make the rooms look awesome! Can anyone hook me up? Thanks!

    lucky14life wrote:
    first i was wondering what everyone thinks about macbooks compared to let's say another pc like hp,dell,etc.... i have been told that i'd have to be dumb to get a machine with windows vista on it,so that is why i have turned my focus to a macbook because i have heard they are pretty good and worth it...
    I personally like my MacBook better than any other computer I have ever owned. I like being able to use windows when I need to but not being tied to it. My wife bought an HP with Vista and it doesn't seem to bad. Lots of updates at least one a week. Mostly graphic card drivers update.
    also is it true that if you upgrade let's say the memory,hard drive,etc it won't be covered in the warranty/apple care plan??
    Only two things you can upgrade on a MacBook is the Hard drive and Memory. It will not void the warranty. This is apples word on it. DIY Warranty Info
    I would just like to ask for people's opinions please on purchasing one of these i am currently a senior in college and will be using it next year for grad school,need to replace the one i currently have...
    Be sure you can live with the graphics. If you do a lot of graphics work you might want to consider the MacBook Pro. I use my MacBook for video editing using Final Cut Express HD and it works well. The MB is also not very good for gaming if you are into that. The integrated chip set doesn't work well with 3D games.
    also any other ideas on getting iwork or office, a hard plastic case or a skin,thanks alot for anyone's input it is greatly appreciated.... i am looking to get one once leopard comes out thanks!!
    Depending on your school may be a factor in what you choose. I use iWork and it is pretty good. You could also try NeoOffice or Open Office. They are good also. Office is supposed to be coming out with a new Mac version but not sure yet how it will work.
    Be sure to ask for the student discount when you purchase the computer and software. It adds up.

  • Authoring Tool "Inherit Class" vs "New Class" vs "Extended Class" Scenario Help

    Hi Community,
    I am currently creating the ground work needed to create Self Service Portal Request Offerings to be used by end users and then take that input and automate it with Orchestrator.
    I'm pretty comfortable with the overall process of how this is done, but I was hoping to get guidance from the community to make sure that I don't waste my time by editing my existing management pack incorrectly from the beginning.
    We currently have a Whole bunch of SR and IR Templates in a Management Pack - lets call it: "Company.Templates.MP" now what I want to do is edit this MP and add new List and String Properties to hold the responses provided from the
    Self Service Portal so that I can use a Runbook Activity to feed these responses into Orchestrator.
    Now what I have done is "Extended" the existing "Service Request" and "Incident" classes and created the new properties in each extended class. Now that I have Extended the default Classes I believe that the properties now apply
    to EVERY existing and new SR and IR.
    My question is... Do you think I have done this correctly?
    I have a gut feeling that I have done it wrong and I should revert my MP changes and then instead of extending the existing IR and SR Classes which affect all existing Work Items, I should create a new SR and IR class which would then be used to create new
    Templates which are then ONLY ones that contain the new properties that would be used for Runbook Automation.
    The feedback I receive will be VERY MUCHLY appreciated...

    Answering your implicit question in the title:
    Inherit is where you create a new class that has all the properties of the parent and then some new ones also, but people can still use the parent for regular work. This is for specialization, like say you want a new type of incident to
    cover firewall problems, and need new properties for the IP and Ports from the portal.
    Extended would be where you add properties to a class that make sense for all of those and all inheriting classes. say the client has a cost of IT tracking system where every Incident and Service Request needs to be assigned a cost of effort
    code, you would create two extensions for Incident and Service request, and point them at the same enum list. you wouldn't extend WorkItem, because changes, activities, released etc wouldn't use a simple cost estimate list value, and you wouldn't inherit off
    of SR and IR because all user requests should have this property, even if some of them are blank  
    New would be a class from scratch that inherits from Entity. This is hardly ever what you want to do, because even completely new things are either work items or config items, and should, where ever possible, inherit from one of those
    basil classes
    Now to your explicit question: No, i think you've done exactly what the situation called for. every SR should have this value, even if it is empty for the historical items.
    two side notes: 1) any item that refers to the base of an extension will continue to work as expected, but  2) Offerings are always the exception. The net of these two rule of thumb guidelines is that your existing templates should continue to work
    without modification, but you may have to recreate the offering before you can use the new property in a question.  
    AFAIK you cannot extend an abstract calls (ex. Work Item), but I could be wrong.
    http://codebeaver.blogspot.dk/

  • How to create a new class

    Hi,
    I'm trying to create a new class called Questions, which has
    two properties (type and condition).
    The action script is saved in the folder myComponents under
    the project.
    When I compile the Main app, I get the following error
    message:
    "1172 Definition myComponents:Question could not be found."
    Why?
    How do you call a constructor for a new class, that is not an
    extension of an existing class?
    Regards
    /Acke
    //-----------Class----------//
    package myComponents
    // Import all classes in the mx.events package
    import mx.events.*;
    public class Question {
    // Public constructor.
    public var Question(){
    // Call the constructor in the superclass.
    //super();
    // Define properties and methods.
    // Define public vars.
    public var type:string;
    public var condition:string;
    //------Main----------//
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    xmlns:MyComp="myComponents.*">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.events.CloseEvent;
    import myComponents.Question;
    etc, etc....

    quote:
    Originally posted by:
    MannenMytenLegenden
    Hi,
    I'm trying to create a new class called Questions, which has
    two properties (type and condition).
    The action script is saved in the folder myComponents under
    the project.
    When I compile the Main app, I get the following error
    message:
    "1172 Definition myComponents:Question could not be found."
    Why?
    How do you call a constructor for a new class, that is not an
    extension of an existing class?
    Regards
    /Acke
    //-----------Class----------//
    package myComponents
    // Import all classes in the mx.events package
    import mx.events.*;
    public class Question {
    // Public constructor.
    public var Question(){
    // Call the constructor in the superclass.
    //super();
    // Define properties and methods.
    // Define public vars.
    public var type:string;
    public var condition:string;
    //------Main----------//
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    xmlns:MyComp="myComponents.*">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.events.CloseEvent;
    import myComponents.Question;
    etc, etc....
    Here is a test class I created a while back, although this
    one does extend Object it might help you out a bit with your
    constructor issue:
    package com.evilest
    import mx.controls.Alert;
    public class Testing_class extends Object
    private var message:String = new String();
    public function Testing_class(input:String) {
    this.message = input;
    public function showAlert():void {
    Alert.show(this.message, "sup");
    }

Maybe you are looking for

  • IPhoto 09 8.0.3 got BUGS

    I just updated to latest version of iphoto09 days ago. And got some bug. 1.Maps are no longer drag-able. If I drag it, it just pull out a map image. 2.Facebook uploading got stuck sometime. 3.Older photos are all invisible when scroll down from libra

  • I pod wont restore through itunes

    Hi, had probs with my i pod classic 180gb. Start up in itunes it says "ipod preparing for recovery" then " itunes detected an ipod in recovery mode needs to restore", so i do that but it comes up saying itunes could not restore " an unknown error has

  • ModelException when moving Activation properties for MDB to ejb-jar.xml

    Hi, I have an MDB called BatchMdb that needs to be deployed into both JBoss and SAP NetWeaver. This means I have different activation config properties depending on the application server. So I cannot specify the properties by annotation, I have to p

  • OBIEE 11.1.1.5 installation error

    Hi, I am installing OBIEE 11.1.1.5 on Solaris 10 sparc 64 bit , i have installed oracle 11.2.0.1.0 then created repository by running rcu after that i intall obiee at step 13 during creating domain it fails any idea. I am using same server for databa

  • Can't watch a video

    I can't watch a video that I Baught  on my iPad . When I push play it flips &go back to play