Building user defined components or suggestion on building menus

I would like to build a menu in my program but I am having a problem with accomplishing it. I have used the code emample from "The Complete Reference Java J2SE 5 Edition and do not under stand why nothing will render. Importing the [java.awt - java.awt.event - java.applet and java.awt.frame[/b] does not seem to do it.String arg = (String)ae.getActionConnand() and another line gives me problems. They are both defined and instanciated. I can add the rest of the 40 lines of code if it would help. Thanks for any help one can give me.

This might be helpful:
Trail: Creating a GUI with JFC/Swing
Lesson: Using Swing Components
How to Use Menus:
http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html

Similar Messages

  • User Defined Components in Forms Developer???

    Hello everybody,
    Just three questions on which the answer I can't find:
    1. Can we create our COMPONENTS (GUI or anything) with and for Forms Developer 2000 ? And If yes how (does anyone knows any documentation???)
    2. Can we create a program splash screen for a program in Oracle Developer and If yes how ( is there any tutorial ?) ?
    3. Can we (and how) install our application icon in Forms created with Dev2k? (You know the small icon appears in the top-left corner of the application window)
    Thanx in advance,
    George ;-)

    Hi George,
    Yeah u can change the icons of application window. U have to do the following steps
    1)Attach the PL/SQL library D2KWUTIL.PLL to your module.
    2)In Pre-Form trigger use the following procedure/function from the attached pll.
    Win_Api_Utility.Get_Active_Window function
    Win_Api_Session.Change_MDI_Icon procedure
    example of how i did in pre_form trigger
    declare
    a pls_integer;
    begin
    a:=Win_Api_Utility.Get_Active_Window (FALSE );
    Win_Api_Session.Change_MDI_Icon (a,'c:\npmis\icons\rt_exit.ico',0);
    end;
    for more information on the package see form help.
    Hope this solves your problem.
    enjoy.....
    Navneet Jain
    [email protected]

  • User Defined Application Component

    Hi,
    Whether we can add/create user defined Components in solution manager?ie for the Component field in the 'Create Message' screen,in the 'Select Application Component'(F4) drop down whether we can create our own components?
    Regards,
    Cherry

    Hi all,
    sorry for the late response, but I just found the thread two month ago.
    Yes, it is possible to have your own components, but with a big BUT. The components are stored in the tables DSWP_CSNCOMP (data) and DSWPCSNCOMPTXT (text). In the data table all available components are stored in a random order but with a subsequent identification number. This number must be in a complete subsequent order without any gaps. Holding this condition you can put now your own components into.
    But now the mentioned BUT: In regular timeframes the Solution Manager contacts SAP to update this table. Of course your own components are not available so they are overwritten during the update. Therefore you have to think for a mechanism (batch job e.g.) that updates ypur components also on a regular base.
    Hope that helps, Alexander

  • How to distinguish the User-Defined-Function from Oracle Build-In function

    Hi Friends,
    I could get the function list form all_objects table by the SQL:
    select * from all_objects where object_type = 'FUNCTION'
    but there is no column in all_objects specify the function is build-in or user-defined.
    But I found in SQL Server there is a column "is_ms_shipped" in the sys.all_objects table. This column will specify the object is build-in or user-defined. I want to get the equivalent column in Oracle but failed.
    Could anyone tell me how to solve this problem?
    Thanks,
    Ricky

    Thanks Pavan.
    But if an user connects to database using "conn /as sysdba" syntax and creates a function. This user-defined funtion goes into the "SYS" schema also. I know it is not the best practise to create objects using sys user so I think your solution is right.
    Regards,
    Ricky

  • How to use user defined contact fields in the intelligent group builder

    In Apple Contacts it seems not being possible to build an intelligent contact group using an user defined, additional field. The builder seems to work exclusively with a system defined selection of the basic database fields. Please, tell me, that there is a way ...

    Please, can sombody out there help?

  • DDL Preview doesn't work correctly - User defined DDL (2.0.0 Build 584)

    After changing "User defined DDL" statement in view definitions, i imported schema metadata (File>Import>Data dictionary) and compared my datamodel with my current database schema. The changes were detected correctly and alter DDL statements for tables generated correctly also.
    When i viewed the "compare models" dialog it all seemed to be all right and the modified User DDL statement for the view was marked. But when i generated DDL script, only the old DDL for this view was generated.
    Even when i try to generate DDL via "DDL Preview" on object directly, the new DDL is ignored.
    I couldn't find forum entries, but maybe some of you have experience about this issue or known bugs.
    Edited by: Stephan Tomczik on 31.01.2011 02:26

    Hi,
    I'm not sure if you're aware, but there is a 3.0 beta version of Data Modeler.
    You can download it freely from here :
    http://www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html
    There are many bugs fixed there.

  • Adding user-defined data

    Okay I am having problems, obviously. I am developing a program where the user will enter X and Y values and the program will calculate the relational data. However, I can't even get a start.
    First of all, the user defines the number of pairs of points they want to define. For example, they have 20 points, each with its own X and Y, so they click on 30 and then okay in the first window.
    The next window will then take their answer and display X and Y text fields for as many points as they defined. However, I can't figure out any way to do this.
    Feel free to run the program, the problem lies in the method setTextFields(). Help please!
    import javax.swing.*;               //FOR SWING COMPONENT CLASSES
    import java.awt.*;                  //FOR CONTAINER CLASS
    import java.awt.event.*;            //FOR EVENT HANDLING
    public class RegressInput extends JFrame
        private JComboBox listJComboBox;        //COMBO BOX TO HOLD HOW MANY PAIRS OF DATA POINTS THE USER HAS TO ENTER
        private JButton answerButton;           //BUTTON TO CLICK AFTER SELECTING PAIRS OF DATA POINTS
        private JPanel textFieldTopPanel;       //TEXT FIELD TOP PANEL
        private JPanel textFieldBottomPanel;    //TEXT FIELD BOTTOM PANEL
        private JPanel textFieldPanel;           //TEXT FIELD PANEL   
        private CardLayout cardSelector;        //DECLARE CARD LAYOUT OBJECT   
        private JPanel cardDeck;                //DECLARE CARD PANEL OBJECT
        public RegressInput(String title)
            super(title);               //CALL SUPERCLASS CONSTRUCTOR
            //CREATE A CONTAINER
            Container container = getContentPane();
            //INSTANTIATE CARD LAYOUT OBJECT
            cardSelector = new CardLayout();
            //INSTANTIATE PANEL OBJECT
            cardDeck = new JPanel();
            //SET LAYOUT OF CARD DECK PANEL TO CARD LAYOUT
            cardDeck.setLayout(cardSelector);
            //DEFINE LABEL FOR FIRST CARD
            Label question = new Label("How many PAIRS of data would you like to enter?");
            //BUTTON TO SUBMIT NUMBER OF POINTS TO PLOT
            answerButton = new JButton("OK");
            listJComboBox = new JComboBox( getArray() );//USE getArray() METHOD TO SET ITEM LIST OF THE COMBO BOX
            listJComboBox.setMaximumRowCount(10);       //SETS THE VISIBLE NUMBER OF ITEMS TO THE USER
            Label xValues = new Label("X Values");      //LABEL FOR X values
            Label yValues = new Label("Y Values");      //LABEL FOR Y values
            //BUILD CARD DECK
            JPanel comboBoxCard = new JPanel();     //CREATE FIRST CARD
            comboBoxCard.add(question);             //ADD question LABEL TO FIRST CARD
            comboBoxCard.add(listJComboBox);        //ADD listJComboBox TO FIRST CARD
            comboBoxCard.add(answerButton);         //ADD answerButton TO FIRST CARD
            textFieldTopPanel = new JPanel();       //CREATE TOP PANEL OF SECOND CARD
            textFieldTopPanel.add(xValues);         //ADD xValues Label TO SECOND CARD
            textFieldTopPanel.add(yValues);         //ADD yValues Label TO SECOND CARD
            textFieldBottomPanel = new JPanel();    //CREATE BOTTOM PANEL OF SECOND CARD
            textFieldBottomPanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));    //SET LAYOUT FOR BOTTOM PANEL
            textFieldPanel = new JPanel();          //CREATE PANEL FOR SECOND CARD
            textFieldPanel.setLayout(new BorderLayout(10, 10)); //SET LAYOUT FOR SECOND CARD
            textFieldPanel.add(textFieldTopPanel, "North"); //ADD textFieldTopPanel TO NORTH
            textFieldPanel.add(textFieldBottomPanel, "South");  //ADD textFieldBottomPanel TO SOUTH
            cardDeck.add(comboBoxCard, "Step 1");       //ADD FIRST CARD TO DECK
            cardDeck.add(textFieldPanel, "Step 2");     //ADD SECOND CARD TO DECK
            container.add(cardDeck);                    //ADD CARD DECK TO CONTAINER
            //DEFINE BUTTON HANDLER OBJECT
            ButtonHandler buttonHandler = new ButtonHandler();
            //ADD ACTION LISTENER FOR BUTTONS
            answerButton.addActionListener(new ButtonHandler());
        }//END RegressInput() CONSTRUCTOR
        //METHOD TO CREATE AND RETURN AN ARRAY OF VALUES FOR JComboBox
        private String[] getArray()
            //CREATE ARRAY TO HOLD 30 VALUES
            int numbers[] = new int[29];
            //CREATE int IN ORDER TO START THE ARRAY AT 2 INSTEAD OF 1
            int number = 2;
            //ASSIGN VALUES FROM 2 TO 30 TO numbers[] ARRAY
            for(int count=0; count < 29; ++count)
                numbers[count] = number;        //SETS EACH INDEX TO number
                number++;                       //INCREMENTS number
            }//END for LOOP
            //CREATE pairs[] ARRAY TO HOLD 30 STRINGS
            String pairs[] = new String[29];
            //ASSIGN VALUES 1 TO 30 IN STRING ARRAY FOR COMBO BOX
            for(int count = 0; count < 29; ++count)
                pairs[count] = "" + numbers[count];
            }//END for LOOP
            return pairs;//RETURNS pairs[] ARRAY FOR THE LIST ITEMS IN listJComboBox
        }//END getArray() METHOD8
        //RETURNS THE ITEM SELECTED BY THE USER FROM THE JComboBox
        private int getValue()
            //ASSIGNS STRING VALUE OF THE JComboBox TO A WRAPPER
            Integer v = new Integer((String) listJComboBox.getSelectedItem());
            //ASSIGNS WRAPPER VALUE TO int
            int value = v.intValue();
            //RETURN VALUE OF SELECTED ITEM
            return value;
        }//END getValue()
        private void setTextFields()
        {//HERE LIES THE PROBLEM! WHAT GOES IN THIS METHOD????
            for(int count = 0; count < (2 * getValue()); ++count)
        }//END setTextFields()
        //BUTTON EVENT HANDLER CLASS
        private class ButtonHandler implements ActionListener
         //PROCESS EVENT
            public void actionPerformed(ActionEvent e)
                //WHICH BUTTON CAUSED THE EVENT?
                if(e.getSource() == answerButton)
                    cardSelector.last(cardDeck);
                    cardDeck.setSize(600,600);
                }//END if STATEMENT
            }//END actionPerformed()
        }//END ButtonHandler CLASS
    }//END RegressInput CLASS
    Here is main:
    import javax.swing.JFrame;
    public class TestSharpStats
         public static void main(String[] args)
            //DEFINE FRAME OBJECT
            RegressInput window = new RegressInput("Hi");     //SETS TITLE BAR
            window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);      //CLOSES WINDOW
            window.setSize(400, 600);    //SET FRAME SIZE
            window.setResizable(true);  //PREVENTS USER FROM RESIZING WINDOW
            window.setVisible(true);     //SETS window TO VISIBLE
        }//END main()
    }//END TestSharpStats CLASS

    If your teacher taught you to program like this they should be shot. There is no need to comment every single line (especially in upper case). The comments stand out more that the code does and doesn't add any usefull information. Obviously comments are important, but you need to pick and choose when to use them.
    Swing related questions should be posted in the Swing forum.
    Also, don't use AWT components in a Swing application. Label is AWT. JLabel is Swing.
    I would use a JTable to input the matching pairs of data. Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]How to Use Table to get started.

  • Can we show some user defined message while cube loading in OBIEE

    Hi All,
    Currently we are building OBIEE dashboards from Essbase ASO Cube as datasource.
    During Essbase Cube loading ,Essbase will "Disable all Administrative Commands".In this mean time,When users are trying to run the dashboards,OBIEE will thorws severe error.
    Can we dispaly some user defined message something like "Cube is loading.Please wait...." or any other alternative.
    Time taken to load the cube is 1hr.Please suggest
    Thanks,
    SatyaB

    Yes, You can better try replacing the whole OBIEE dashboard with a custom message. Whenver the load happens...you shud trigger or set a flag value to 'Y'. Using guided navigation when Flag value is matched to Y...right a JS to replace the whole dashboard.
    [html]
    [head]
    [script type="text/javascript"]var strStatus="@1";
    if(strStatus =='Y')
    location.replace('saw.dll?PortalPages&_scid=in6lPJnWWNk&PortalPath=/shared/Framework/_portal/Cube%20Status%20&Page=Cube%20Status');
    [script]
    [head]
    Replace square bracket with curly brackets in above replace code..
    BTW, you shud mark the previous post on Implicit fact. Follow https://forums.oracle.com/forums/ann.jspa?annID=939

  • User Defined Lists Setup Alternatives

    I have a rather large system project coming up.  One of the pillars of this system is to have the ability for users to create generic lists that can then be referenced by the UI and backend processes.  In order to data-drive this setup, I'm searching
    for different suggestions / links about setting up the tables necessary to build such a generic list setup.
    As an example, a user might want to create a list containing a simple name/value pair.  Or, something more complicated where two values make up the natural key and are associated with a date value, a money value, and a couple of text values creating
    a 6-column list.
    I've seen a couple out there:
    80/20 Rule Approach
    Create a registry to store the list names and also a registry for column names and how they would be referenced / called.  The list would be stored in something like the following:
    CREATE TABLE list.StandardListStore
    EntryId uniqueidentifier NOT NULL DEFAULT NEWID(),
    ListRegistryId uniqueidentifier NOT NULL,
    KeyColumn1 nvarchar(100) NOT NULL,
    KeyColumn2 nvarchar(100) NOT NULL,
    KeyColumn3 nvarchar(100) NOT NULL,
    TextColumn1 nvarchar(200) NULL,
    TextColumn2 nvarchar(200) NULL,
    TextColumn3 nvarchar(200) NULL,
    FactorColumn1 decimal(15,9) NULL,
    FactorColumn2 decimal(15,9) NULL,
    MoneyColumn1 money NULL,
    MoneyColumn2 money NULL,
    DateColumn1 datetime NULL,
    DateColumn2 datetime NULL,
    CreateDate datetime NOT NULL DEFAULT GETDATE(),
    CreateUser nvarchar(100) NOT NULL DEFAULT SYSTEM_USER,
    UpdateDate datetime NOT NULL DEFAULT GETDATE(),
    UpdateUser nvarchar(100) NOT NULL DEFAULT SYSTEM_USER,
    CONSTRAINT PK_list_StandardListStore PRIMARY KEY CLUSTERED (EntryId),
    CONSTRAINT UQ_list_StandardListStore UNIQUE(ListRegistryId, KeyColumn1, KeyColumn2, KeyColumn3)
    GO
    Obviously a lot of wasted space plus sooner or later, someone would want a list that wouldn't fit.  Expansion would be by adding a new datatype-based column to accommodate a larger list.
    Second Approach - More Flexible but more complicated to manage
    In this one you would have a trimmed down version of the list store above with just the row/entry id and key columns such as the following:
    CREATE TABLE list.StandardListStore
    EntryId uniqueidentifier NOT NULL DEFAULT NEWID(),
    ListRegistryId uniqueidentifier NOT NULL,
    KeyColumn1 nvarchar(100) NOT NULL,
    KeyColumn2 nvarchar(100) NOT NULL,
    KeyColumn3 nvarchar(100) NOT NULL,
    CreateDate datetime NOT NULL DEFAULT GETDATE(),
    CreateUser nvarchar(100) NOT NULL DEFAULT SYSTEM_USER,
    UpdateDate datetime NOT NULL DEFAULT GETDATE(),
    UpdateUser nvarchar(100) NOT NULL DEFAULT SYSTEM_USER,
    CONSTRAINT PK_list_StandardListStore PRIMARY KEY CLUSTERED (EntryId),
    CONSTRAINT UQ_list_StandardListStore UNIQUE(ListRegistryId, KeyColumn1, KeyColumn2, KeyColumn3)
    GO
    Then each possible datatype would have it's own dedicated table by data type such as the following:
    CREATE TABLE list.StandardListTextColumns
    DataId uniqueidentifier NOT NULL DEFAULT NEWID(),
    EntryId uniqueidentifier NOT NULL, -- From the list store
    RegistryColumnId uniqueidentifier NOT NULL, -- Column being referenced
    TextColumn nvarchar(500) NULL,
    CONSTRAINT PK_list_StandardListTextColumns PRIMARY KEY CLUSTERED (DataId)
    GO
    So, there'd be an int table, a datetime table, a money table, etc.  
    This approach a lot more flexible.  The challenge here is how to combine 1-many data columns from various datatype-based column tables into some semblance of a row that can be presented to the user without hard-coding any column names (no pivot).
    So, do you guys know of any books, links, samples, or have suggestions for lists such as these?  Should I install a local SharePoint instance and see how they created their user-defined list database objects?
    Any advice is much appreciated.
    Thanks.

    Sounds like you're over thinking this. A list is just a list... 
    Just off the top of my head, the following structure would allow a user to build whatever type of list they'd like and then be able to come back later and apply any of their lists to a given policy (for example), and store the values.
    CREATE TABLE dbo.ListCategory (
    ListCategoryName VARCHAR(50) NOT NULL PRIMARY KEY
    CREATE TABLE dbo.ListHeader (
    ListHeaderID INT NOT NULL IDENTITY(1,1) PRIMARY KEY,
    ListName VARCHAR(50) NOT NULL,
    ListCategory VARCHAR(50)
    CONSTRAINT fk_ListCategory FOREIGN KEY REFERENCES dbo.ListCategory(ListCategoryName),
    ListOwner INT
    CONSTRAINT fk_Users FOREIGN KEY REFERENCES dbo.Users(UserID),
    CreatedDate DATETIME
    CREATE TABLE dbo.ListItems (
    ListItemID INT NOT NULL IDENTITY(1,1) PRIMARY KEY,
    ListHeaderID INT NOT NULL
    CONSTRAINT fk_ListHeader FOREIGN KEY REFERENCES dbo.ListHeader(ListHeaderID),
    ListItemName VARCHAR(100) NOT NULL,
    OrderBy INT NOT NULL
    CREATE TABLE dbo.PolicyListResponses (
    PolicyNumber VARCHAR(50)
    CONSTRAINT fk_Policy FOREIGN KEY REFERENCES dbo.Policies(PolicyNumber),
    ListHeaderID INT NOT NULL
    CONSTRAINT fk_ListHeader2 FOREIGN KEY REFERENCES dbo.ListHeader(ListHeaderID),
    ListItemID INT NOT NULL
    CONSTRAINT fk_ListItems FOREIGN KEY REFERENCES dbo.ListItems(ListItemID),
    ListItemValue VARCHAR(50) NOT NULL,
    CONSTRAINT pk_PolicyListResponses PRIMARY KEY (PolicyNumber,ListHeaderID,ListItemID)
    HTH,
    Jason
    Jason Long

  • Reg: Configuring the User-Defined Message Search

    Hi Experts !
    I am getting an error while configuring the user defined message search.
    Followed all the step mentioned in the sap help documentation.
    http://help.sap.com/saphelp_nwpi711/helpdata/en/48/c85598f63335bfe10000000a42189d/frameset.htm
    The last step, where we need to enter  URL for WSDL Access i am getting the following error:
    Error in WSDL access: Exception occurred in communication framework:
    Error in HTTP Framework:404Not Found
    http://<Host>/<Port>/MessageSearch/MessageSearchImplBean
    You should enter the host name and the HTTP port for the Advanced Adapter Engine
    i didnt get the meaning of above sentence : Is it different from what we use in the URL to access ESR and ID.
    Is there any other steps to make   MessageSearch/MessageSearchImplBean available
    Regards,
    Srinivas
    Edited by: Srinivas on Oct 1, 2010 7:48 PM

    Hi José Omar,
    thanks for the reply...
    I tried manual configuration but with no luck..opened a similar forum thread
    I have applied the sap note suggested  ,thinking that the error is due
    to any source code.
    The data synchronization is happening properly , but when i use test extractor button it throws the above mentioned error.
    In the system details  in have given the port number as 50700(which is visible in the link when we open integration builder page) and ESR client as 001.
    could you please let me know if the exact values to be filled in transport setting.i just entered the port and client , other things
    as default.
    Regards,
    Srinivas

  • User defined libary for objects

    Hi,
    We use Acrobat Designer 7.0 to build our documents.
    I just tried to set up a shared objects library on our network, so
    everyone uses the same objects to design a document.
    Why does the library not show the objects I dropped there?
    In the german version you can define a place for this library on the
    network but a xml-file is needed. I tried to edit the local library xml-file an copied it in the directory but
    the library register does not show the objects that I drop there.
    I hope someone can help because the german support is a disaster!
    Greetings
    A.Wimmer

    Hello,
    Thank you for your suggestions so far, the variant which is changing is the layout of the report, the users can select different options on the selection screen e.g. co code etc. but wants the layout to be defaulted as always the same when the report is run and the variant for the layout of the report is selected because the users has created an own defined layout.
    WE have already simulated the problem by copying the user and their profile in our sandbox and saving a layout ourselves but so far have been unable to re - create the isue where the columns in the report layout are changed even though the user as not changed their own user defined layout. Any more suggestions would be welcome

  • User Defined Formulae

    Hi All,
    I have a requirement to execute very simple user defined
    formulae. The user would create an object of a certain class, and
    in certain cases the value of one of the properties would depend
    upon another object of the same class that had been created
    earlier.
    So assuming the objects have a property called "Price", I
    would like to enable the user to create an object A with a Price of
    30 and object B with a Price equal to the objectA.Price * 2.
    I am guessing that the way to do this is to store a formula
    as a string in the database
    eg objectB.Price = objectA.Price * 2;
    But how do I retrieve that formula and execute it?
    Can I convert the string to become a function, if so can you
    show me the code for that?
    Any suggestions gratefully received.

    This is actually quite difficult in AS, since there is no
    true eval() function, thus no way to execute a string tht looks
    like an expression.
    I think you are going to have to parse your strings yourself,
    and execute the operations manually.
    To support this in our app, the use must create the
    expression, then publish the app. Publishing builds a string
    defining an mxml component, using the strings they wrote. When the
    published component is compiled and run, the epressions execute
    normally.
    Tracy

  • Using a user-defined element in ASO cube.

    I have an ASO cube to which I'm adding a new hierarchy/dim containing a single user-defined element as a member. This dim is set to dynamic at dimension level, since I'm going to add additional members with formulas.
    My issue is that as soon as I add this new hierarchy to my cube, all my fact values double! What could cause this and how should I fix this? The user-defined element in this new dim is not connect to the rest of my data in any way, i.e. it is not in any table of my minischema. So why should it have any impact on my data values? Should I be adding a filter of some kind on this user-defined element?
    Fyi- I'm using Essbase Studio (EPM 11.1.2) for cube building and data loading.
    Appreciate any help.
    thanks,
    Axe

    A colleague suggested a reason that SDO_GEOMETRY works is that it is granted to PUBLIC with GRANT OPTION. PUBLIC is not a proper role, somewhere between a user and a role and the issue of having to receive permissions on the type explicitly do not apply.
    If I GRANT EXECUTE ON XTYPE TO PUBLIC WITH GRANT OPTION; it works!
    Thanks for the replies.
    C

  • Adding user-defined number of text fields.

    Okay I am having problems, obviously. I am developing a program where the user will enter X and Y values and the program will calculate the relational data. However, I can't even get a start.
    First of all, the user defines the number of pairs of points they want to define. For example, they have 20 points, each with its own X and Y, so they click on 20 and then okay in the first window.
    The next window will then take their answer and display X and Y text fields for as many points as they defined. However, I can't figure out any way to do this.
    Feel free to run the program, the problem lies in the method setTextFields(). Help please!
    import javax.swing.*;               //FOR SWING COMPONENT CLASSES
    import java.awt.*;                  //FOR CONTAINER CLASS
    import java.awt.event.*;            //FOR EVENT HANDLING
    public class RegressInput extends JFrame
        private JComboBox listJComboBox;        //COMBO BOX TO HOLD HOW MANY PAIRS OF DATA POINTS THE USER HAS TO ENTER
        private JButton answerButton;           //BUTTON TO CLICK AFTER SELECTING PAIRS OF DATA POINTS
        private JPanel textFieldTopPanel;       //TEXT FIELD TOP PANEL
        private JPanel textFieldBottomPanel;    //TEXT FIELD BOTTOM PANEL
        private JPanel textFieldPanel;           //TEXT FIELD PANEL   
        private CardLayout cardSelector;        //DECLARE CARD LAYOUT OBJECT   
        private JPanel cardDeck;                //DECLARE CARD PANEL OBJECT
        public RegressInput(String title)
            super(title);               //CALL SUPERCLASS CONSTRUCTOR
            //CREATE A CONTAINER
            Container container = getContentPane();
            //INSTANTIATE CARD LAYOUT OBJECT
            cardSelector = new CardLayout();
            //INSTANTIATE PANEL OBJECT
            cardDeck = new JPanel();
            //SET LAYOUT OF CARD DECK PANEL TO CARD LAYOUT
            cardDeck.setLayout(cardSelector);
            //DEFINE LABEL FOR FIRST CARD
            Label question = new Label("How many PAIRS of data would you like to enter?");
            //BUTTON TO SUBMIT NUMBER OF POINTS TO PLOT
            answerButton = new JButton("OK");
            listJComboBox = new JComboBox( getArray() );//USE getArray() METHOD TO SET ITEM LIST OF THE COMBO BOX
            listJComboBox.setMaximumRowCount(10);       //SETS THE VISIBLE NUMBER OF ITEMS TO THE USER
            Label xValues = new Label("X Values");      //LABEL FOR X values
            Label yValues = new Label("Y Values");      //LABEL FOR Y values
            //BUILD CARD DECK
            JPanel comboBoxCard = new JPanel();     //CREATE FIRST CARD
            comboBoxCard.add(question);             //ADD question LABEL TO FIRST CARD
            comboBoxCard.add(listJComboBox);        //ADD listJComboBox TO FIRST CARD
            comboBoxCard.add(answerButton);         //ADD answerButton TO FIRST CARD
            textFieldTopPanel = new JPanel();       //CREATE TOP PANEL OF SECOND CARD
            textFieldTopPanel.add(xValues);         //ADD xValues Label TO SECOND CARD
            textFieldTopPanel.add(yValues);         //ADD yValues Label TO SECOND CARD
            textFieldBottomPanel = new JPanel();    //CREATE BOTTOM PANEL OF SECOND CARD
            textFieldBottomPanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));    //SET LAYOUT FOR BOTTOM PANEL
            textFieldPanel = new JPanel();          //CREATE PANEL FOR SECOND CARD
            textFieldPanel.setLayout(new BorderLayout(10, 10)); //SET LAYOUT FOR SECOND CARD
            textFieldPanel.add(textFieldTopPanel, "North"); //ADD textFieldTopPanel TO NORTH
            textFieldPanel.add(textFieldBottomPanel, "South");  //ADD textFieldBottomPanel TO SOUTH
            cardDeck.add(comboBoxCard, "Step 1");       //ADD FIRST CARD TO DECK
            cardDeck.add(textFieldPanel, "Step 2");     //ADD SECOND CARD TO DECK
            container.add(cardDeck);                    //ADD CARD DECK TO CONTAINER
            //DEFINE BUTTON HANDLER OBJECT
            ButtonHandler buttonHandler = new ButtonHandler();
            //ADD ACTION LISTENER FOR BUTTONS
            answerButton.addActionListener(new ButtonHandler());
        }//END RegressInput() CONSTRUCTOR
        //METHOD TO CREATE AND RETURN AN ARRAY OF VALUES FOR JComboBox
        private String[] getArray()
            //CREATE ARRAY TO HOLD 30 VALUES
            int numbers[] = new int[29];
            //CREATE int IN ORDER TO START THE ARRAY AT 2 INSTEAD OF 1
            int number = 2;
            //ASSIGN VALUES FROM 2 TO 30 TO numbers[] ARRAY
            for(int count=0; count < 29; ++count)
                numbers[count] = number;        //SETS EACH INDEX TO number
                number++;                       //INCREMENTS number
            }//END for LOOP
            //CREATE pairs[] ARRAY TO HOLD 30 STRINGS
            String pairs[] = new String[29];
            //ASSIGN VALUES 1 TO 30 IN STRING ARRAY FOR COMBO BOX
            for(int count = 0; count < 29; ++count)
                pairs[count] = "" + numbers[count];
            }//END for LOOP
            return pairs;//RETURNS pairs[] ARRAY FOR THE LIST ITEMS IN listJComboBox
        }//END getArray() METHOD8
        //RETURNS THE ITEM SELECTED BY THE USER FROM THE JComboBox
        private int getValue()
            //ASSIGNS STRING VALUE OF THE JComboBox TO A WRAPPER
            Integer v = new Integer((String) listJComboBox.getSelectedItem());
            //ASSIGNS WRAPPER VALUE TO int
            int value = v.intValue();
            //RETURN VALUE OF SELECTED ITEM
            return value;
        }//END getValue()
        private void setTextFields()
        {//HERE LIES THE PROBLEM! WHAT GOES IN THIS METHOD????
            for(int count = 0; count < (2 * getValue()); ++count)
        }//END setTextFields()
        //BUTTON EVENT HANDLER CLASS
        private class ButtonHandler implements ActionListener
         //PROCESS EVENT
            public void actionPerformed(ActionEvent e)
                //WHICH BUTTON CAUSED THE EVENT?
                if(e.getSource() == answerButton)
                    cardSelector.last(cardDeck);
                    cardDeck.setSize(600,600);
                }//END if STATEMENT
            }//END actionPerformed()
        }//END ButtonHandler CLASS
    }//END RegressInput CLASSHere is main:
    import javax.swing.JFrame;
    public class TestSharpStats
         public static void main(String[] args)
            //DEFINE FRAME OBJECT
            RegressInput window = new RegressInput("Hi");     //SETS TITLE BAR
            window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);      //CLOSES WINDOW
            window.setSize(400, 600);    //SET FRAME SIZE
            window.setResizable(true);  //PREVENTS USER FROM RESIZING WINDOW
            window.setVisible(true);     //SETS window TO VISIBLE
        }//END main()
    }//END TestSharpStats CLASS

    muit-post: http://forum.java.sun.com/thread.jspa?messageID=4442652

  • How to use user-defined packages in JAX-RPC web service

    I am trying to use Object of my class located in my package in jax-rpc webservice,the code is
    package supercomputer;
    import Hello.*;
    public class SuperImpl implements SuperIF
    public String sendParam(String data)
    Temp ob=new Temp();
    int i=ob.get1(10000);
    return data+"returned by supercomputer";
    Temp is located in Hello package,I have jar the Hello package as Hello.jar and has set its classpath in targets.xml of Ant tool.
    The code compiles well and service is deployed successfully,but when i try to call the service from the client its gives me following error.
    [echo] Running the supercomputer.SuperClient program....
    [java] java.rmi.ServerException: Missing port information
    [java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:357)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
    [java] at supercomputer.SuperIF_Stub.sendParam(SuperIF_Stub.java:60)
    [java] at supercomputer.SuperClient.main(Unknown Source)
    I dont know if it deploys why it gives error on client side.
    Please tell how to use user-defined packages and class in jax-rpc service code ,i am not talking about passing user-defined parameters i am just talking about making objects of user defined classes in jax-rpc service.I think there is some problem in classpath.
    Please guide me in doing that.
    Thanks,
    Farrukh

    Farrukh,
    I don't know if your error is about a missing class from your custom package, ... what track did you followed to say that?
    To use your package in the implementation of you web service, you should only follow the rules of making a web application: put your package jar in your \lib directory inside WEB-INF/ or your package classes unjared in classes (also in WEB-INF/).
    As I already said, I have doubts that your error should be originated from a missing class from your package, but:
    -try to see the logs (errors?) when you deploy your web service that could give a hint about the problem.
    -try to see if you can access your endpoint through your browser to see if there is a online status
    -display your config/WSDL file, and the steps you did to build your web service.
    regards,
    Pedro Salazar.

Maybe you are looking for

  • How to edit email address present in a SP2010 list

    HI, In the SP2010 list "Request Page", whenever a user submits a request an automated email goes to a specific email id reagrding the submission of request. I donot know how the internal procedure is done as i am totally new to SP . I tried going to

  • DATE and Time related FUNCTIONS in SQL

    I want to know the Answers(Queries) for below mentioned Question. Q!--list the name of account holders who have opened a/c in the last 5 days Q2--week-wise no of account opened in Last month? Q3--list branch-wise,product-wise total amount as on Last

  • Problem with DMPLX200(2

    Please help! when i try to switch On my mp3 player, the following message occurs: -English font only -please donwload -DEFAULT.ROM- file from the CD -player will beimprove, shutdown for a... (countdown then the unit will turn-off) first, my pc is a w

  • Question on Select query

    Hi, I need to prepare a select query which can fetch the below mentioned scenario: Ztable has fields zident, date, time, status. (zident, date, time are key fields) zident      date        time               status       10001    02/09/09    111111  

  • Trying to find the Find/Change queries

    Okay I thought I knew where these were.  I've looked in C:\Users\phyllis\AppData\Local\Adobe\InDesign\Version 6.0\en_US\Caches There are files there called FindChangeData and FindChangeDataTmp, but writing them into the folder for Version 7.5 doesn't