Creating a Gui Input Form

Hi,
I've got a class called GamePanel which extends JPanel. Currently I have only one JTextField (theTextField1) and one JButton (theButton1).
I've got a class called GameFrame which extends JFrame, in its constructor it creates a new GamePanel. It has methods getInt, getDouble and getString.
When theButton1 is clicked the program returns the appropriate value (i.e. an Integer that is typed in theTextField1 for getInt method in GameFrame).
Inside any other class I can create a new GameFrame and can get values to put into variables or to put into constructors as parameters e.g.
GameFrame theGameFrame = new GameFrame;
String name = theGameFrame.getString();
Now, I want to add more JTextFields to GamePanel i.e. theTextField2, theTextField3.
How do I get values typed into theTextField(s) into variables/parameters in other classes e.g.
String name = theTextField1
int age = theTextField2
double height = theTextField3
Please lend me your help.

Well, it's not quite clear what, exactly, you are having a problem with.
If you want to put more text fields, put more text fields. If you want to lay them out properly, you probably would want to nest some other panels.....
JTextField textfield0 = null;
JTextField textfield1 = null;
JTextField textfield2 = null;
public GamePanel() {
     JPanel p = new JPanel();
     p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
     JPanel p0 = new JPanel(new FlowLayout(FlowLayout.LEFT));
     p0.add(new JLabel("field 1"));
     textfield0 = new JTextField();
     p0.add(textfield0);
     p.add(p0);
     JPanel p1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
     p1.add(new JLabel("field 2"));
     textfield1 = new JTextField();
     p1.add(textfield1);
     p.add(p1);
     JPanel p2 = new JPanel(new FlowLayout(FlowLayout.LEFT));
     p2.add(new JLabel("field 3"));
     textfield2 = new JTextField();
     p2.add(textfield2);
     p.add(p2);
     add(p);
}

Similar Messages

  • How to create a simple input form in BPC 10.0 and the details are below

    Hi Experts,
    I would like to know how to create attached input form and what are the dimension would require to use in order to populate correct report
    Please provide your comments and the sample report has been attached.
    MGA Index
    Column
    Head Count Planning Required
    Approver authority
    Asset
    Row_Cost Center
    Business Development
    Finance
    Procurement -
      C&P
    Legal
    HSS &  Environment
    Petroleum Engg
    Drilling
    Subsurface
    Thanks in advance.
    Regards,
    SK.

    Hello,
    The new update of Muse allows you to use the Webforms widget with a non Business Catalyst host as well.
    However, Captcha is something which currently cannot be used via Muse without using Business Catalyst as host.
    This document might be of some help : http://forums.adobe.com/docs/DOC-3581
    Regards,
    Sachin

  • How to Create an Input Form using a Transient View Object?

    I would like to use a Transient View Object to store data from input forms across a multiple-page enrollment process.
    My question is how to I create the input form using the Transient View Object on the .jspx page? Do I drag/drop an ADF creation form onto the page? Or, use a regular ADF form? Do I need to create the initial row progammatically?
    Just looking for some general directions or set of instructions? I've looked at the SRDemo example (Globals Transient View Object), but I'm not sure how they created the page at design time?
    thanks

    Well following the SRDemo example, this seems to work:
    1. Create Transient View Object
    2. Add to Application Module as a Data control
    3. Add to .jspx page as an ADF Form (not as an ADF Create Form)
    4. Add following code to Application Module containting Transient VO instance:
    protected void prepareSession(Session session) {
    super.prepareSession(session);
    insertTransientViewObjRows();
    private void insertTransientViewObjRows() {
    ViewObject transientvo = getViewObj1();
    transientvo.clearCache();
    transientvo.insertRow(transientvo.createRow());
    }

  • BPC 10.1 Unified Model - Is it a must to have BEx query to create an input form/report?

    Dear All,
    Have a cube(Unified) created in BW 7.4.
    To create an input form using that cube(unified), Is it mandatory that I need a BEx query for the input form/report?
    i.e. To create an input form/report in BPC 10.1 Unified environment using a Unified model, is it a MUST to have a BEx query in place? Or, can I create an input form using 10.1 Unified model without BEx query using 10.1 Unified model?
    Thank you!
    Regards,
    Peri

    Hi Peri,
    It doesn't matter what you include in the rows and what in columns or free characteristics: think of it as a sub-cube of the original cube. You are basically listing Dimensions you need in a group of you reports and can add new measures.
    In BPC report you'll arrange them on the screen, format, protect, etc.
    So, some of it is a repeat (not all tho), but for different purposes.
    Hope this helps,
    Gersh

  • Create Input Form

    I started to build a Fusion App with EJB-JPA business layer.
    I am working to create an Input Form but I can't follow exactly the paragraph 26.6 of Fusion Dev. Guide (create an Input Form) because I can't have a createInsert operation on my DataControl.
    How can I create an Input Form into application whit DacaCOntrol created from EJB-JPA business components ?

    I am very frustrating , it is ever more clear for me that it's impossible to build a nice Fusion App without to use the SDF BC .
    In this case I have a entity , Account .
    Simply I want to create a form to insert all fields of Account.
    Then I dragged the accountFindAll collection from data control and dropped it as ADF Form.
    After, I have created 1 methodAction to call the persistAccount (Account) method and one action to initially have an Account object as current row of accountFindAll iterator.
    Seem all ok , or not ?
    Instead I have a lot of problem :
    1) when using the page to insert Account and after return to other page listing all Account , I see 2 Account created with the same data, one is Account really inserted in DB and another is Account stored in current row of accountFindAll iterator
    2) when I reuse the insert page in the second time the account form is populated with data previously inserted
    please help me ... I want to make a form to create a Simple object but I have a EJB-JPA business layer ,not ADF BC , it's possible ???
    This is my page def :
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel" version="11.1.2.60.17" id="createAccountPageDef"
    Package="admin">
    <parameters/>
    <executables>
    <variableIterator id="variables"/>
    <page path="templates.mainTemplatePageDef" id="ptb1" Refresh="ifNeeded"/>
    <iterator Binds="root" RangeSize="-1" DataControl="AdminServiceLocal" id="AdminServiceLocalIterator"/>
    <accessorIterator MasterBinding="AdminServiceLocalIterator" Binds="accountFindAll" RangeSize="-1"
    DataControl="AdminServiceLocal" BeanClass="org.savino.hb.model.entity.Account"
    id="accountFindAllIterator" Refresh="never"/>
    <invokeAction id="ia1" Binds="Create" Refresh="prepareModel"/>
    <accessorIterator id="userFindAllIterator" MasterBinding="AdminServiceLocalIterator" Binds="userFindAll"
    RangeSize="25" DataControl="AdminServiceLocal" BeanClass="org.savino.hb.model.entity.User"
    Refresh="prepareModel"/>
    <!--
    <accessorIterator MasterBinding="accountFindAllIterator" Binds="userList" RangeSize="25"
    DataControl="AdminServiceLocal" BeanClass="org.savino.hb.model.entity.User"
    id="userListIterator"/>
    -->
    </executables>
    <bindings>
    <attributeValues IterBinding="accountFindAllIterator" id="dataSaldo">
    <AttrNames>
    <Item Value="dataSaldo"/>
    </AttrNames>
    </attributeValues>
    <attributeValues IterBinding="accountFindAllIterator" id="descr">
    <AttrNames>
    <Item Value="descr"/>
    </AttrNames>
    </attributeValues>
    <attributeValues IterBinding="accountFindAllIterator" id="iban">
    <AttrNames>
    <Item Value="iban"/>
    </AttrNames>
    </attributeValues>
    <attributeValues IterBinding="accountFindAllIterator" id="saldo">
    <AttrNames>
    <Item Value="saldo"/>
    </AttrNames>
    </attributeValues>
    <action IterBinding="accountFindAllIterator" id="Create" RequiresUpdateModel="true" Action="createRow"/>
    <methodAction id="persistAccount" RequiresUpdateModel="true" Action="invokeMethod" MethodName="persistAccount"
    IsViewObjectMethod="false" DataControl="AdminServiceLocal"
    InstanceName="data.AdminServiceLocal.dataProvider"
    ReturnName="data.AdminServiceLocal.methodResults.persistAccount_AdminServiceLocal_dataProvider_persistAccount_result">
    <NamedData NDName="account" NDValue=""
    NDType="org.savino.hb.model.entity.Account"/>
    </methodAction>
    </bindings>
    </pageDefinition>
    Edited by: Kronos72it on Oct 6, 2011 6:14 PM
    any reply ?

  • Input form for creating an xml document

    are there any utilities which will help me to create an input form for an xml file. The requirement is to come up with a form which will help me input data which can be saved as an xml file.

    Thanks Camalot,
    I was just thinking of selecting images from the finder but if this could be integrated into Aperture's export dialog that would be even better.
    this is the xml:
    <?xml version="1.0" encoding="utf-8"?>
    <gallery thumbwidth="220" thumbheight="138" columns="3" gap="4">
    <item>
    <ID>1</ID>
    <title><![CDATA[Title 1]]></title>
    <desc><![CDATA[This is description 1. <font color="#0099CC">This is a colourful text. </font> This is a <a href="http://www.flashden.net/user/iceonflames">link</a>. <i>This is italic text.</i> <b>This is bold text.</b> <b><i>This is bold italic text.</i></b> This text is styled by a CSS document.<br/><br/>]]></desc>
    <thumb>images/thumbs/7.jpg</thumb>
    <image>images/big/7.jpg</image>
    </item>
    <item>
    <ID>2</ID>
    <thumb>images/thumbs/8.jpg</thumb>
    <image>images/big/8.jpg</image>
    </item>
    <item>
    <ID>3</ID>
    <title><![CDATA[Title 3]]></title>
    <desc><![CDATA[This is description 3. <font color="#0099CC">This is a colourful text. </font> This is a <a href="http://www.flashden.net/user/iceonflames">link</a>. <i>This is italic text.</i> <b>This is bold text.</b> <b><i>This is bold italic text.</i></b> This text is styled by a CSS document.<br/><br/>]]></desc>
    <thumb>images/thumbs/9.jpg</thumb>
    <image>images/big/9.jpg</image>
    </item>
    </gallery>

  • Use of oledb database connection in input form of process

    I've created dynamic pdf form with data connection to mssql database and with script that automatically adds rows to table and fills fields.
    When I try to open this form as input form for my process in workspace it generates an error: Unable to create SOM expression. That means that sql database connection works not properly.
    How can I fix this? Is it possible to use data connection to oledb database in the input form?

    Hi,
    I have a form that includes db connection (OLDB ->Access). But in
    workspace I have an error while initiating it. The error is an Adobe Acrobat message;
    "Unable to create SOM expression $record.tablename.fieldname"
    I am using Acrobat 9 pro ext. and when I use reader then there is no problem.
    I removed enhanced security settings in preferences of Acrobat. What else i can do? Any suggestions?
    Thank in advance..

  • How to combine data from different input forms outside a nested iView

    Hi,
    i try to combine data from different input forms in a single one.
    Because of space reasons in Flex compiling i already use nested iViews. Within these nested iViews its possible to use the 'combine' function to do this.
    But in the main iView I cant compose these function with other elements. I need to do this because of using these model in Guided Procedures with output parameters. These parameters I only get with a 'endPoint'. Unfortunatly its not possible to combine data from different input forms into the 'endPoint'.
    Is there any solution?
    Thanx
    Mathias

    Hi Scott,
    i tried this already and i also tried to map all parameters in the endpoint by drawing lines from the other forms and assign the 'empty parameters' by a formula.
    And when i create a collable object in GP and assign the VC iView, only the parameters of the parent-form (the form who trigger the event) are shown as output-parameters.
    Maybe any other ideas? I cant believe that such a simple thing is not possible?!?!
    In my opinion, thats a bug, that I'am not able to use the combine-operator in the main VC-iView. Whats your mind?
    greets
    mathias

  • Creating a manual tabular form on an empty table

    Hi all,
    I am trying to create a manual tabular form on an empty table. Is it possible to display textboxes and column headers, when I run the report I get "no data found".
    Regards,

    Hi Denes and thank you for your valuable input.
    My problem is in fact that, I have created the tabular form by using a report region with a SQL query, something like,
    select apex_item.display_and_save(1, p.bolge) bolge,
    apex_item.display_and_save(2, p.hafta) hafta,
    apex_item.display_and_save(3, p.yil) yil,
    apex_item.display_and_save(4, p.mamul) mamul,
    apex_item.display_and_save(5, p.tahmin1) tahmin1,
    apex_item.display_and_save(6, p.tahmin2) tahmin2,
    apex_item.display_and_save(7, p.tahmin3) tahmin3,
    apex_item.display_and_save(8, p.tahmin4) tahmin4,
    apex_item.display_and_save(9, p.tahmin5) tahmin5,
    apex_item.display_and_save(10, p.tahmin6) tahmin6,
    apex_item.display_and_save(11, p.revize4) revize4,
    apex_item.display_and_save(12, p.revize5) revize5,
    apex_item.display_and_save(13, p.revize6) revize6
    from portal_link.v_planlama p
    The problem is that, since there is no data in the table, when I run the page, I cant get the form to be rendered, and I get a nice "no data found". There should be a way to get the form rendered, hence making it available for data input.
    Regards,
    Onur

  • When creating a fillable PDF form can I add a password to only selected fields?

    I am creating a fillable form which will require data entry from several different people before being returned to my office. There are certain fields on the form that need to be restricted to personnel in my office only. I have tried to accomplish this restriction many different ways but have been unsuccessful.
    The closest I have come to accomplishing this restriction is by adding a "For HRO Only" button which I can use to hide certain fields from personnel outside of my office and unhide the text field when the button is clicked. This would be perfect if I could add a password to the button. Unfortunately this is either not possible or I haven't figured out how to do it which means that personnel outside of my office can still access the fields with a click of a button.
    The only other way I have thought of to accomplish this restriction is to mark those fields as "read only" but it seems as though it would be very time consuming for personnel in my office to complete the form due to the fact that they would have to open "edit form",  open the properties for each field requiring their input, and uncheck "read only" for each one.
    Any help/options/ideas you can provide will be greatly appreciate. Thank you!

    Thank you so much for the quick response. This will be a huge help! I hate to be a bother, but can you tell me the steps to create the script or give me a reference/resouce to use? I have used adobe products quite a bit, but this is my first time creating a PDF Fillable Form that will be distributed for use by several people so I am a little lost.
    Also, I seem to be running into one more problem that I am hoping you can help me figure out. On the form there is a question for the recipient  to answer by checking one of two boxes, yes or no. Depending on the answer an action is initiated. This feature works perfectly, however the issue is that when the recipient choses "yes" he/she is directed to fill out four additional fields that I currently have set as "required", but when the recipient choses "No" the four additional fields are hidden yet still required. This becomes an issue when the recipient has completed the form and tries to submit the form. An error message pops up notifying the user there are required fields that are empty and must be completed before submission.
    My thought is (in a perfect world) one of these two options would be ideal:
    1. When the "No" option is chosen the four additional fields are changed from required to not required, or
    2. When the "No" option is chose the four additional required fields are autopopulated with NA.
    Either remedy would work just fine, however I am open to suggestions... Again thank you so much for your help with my previous question and thank you in advance for any information/help/advice you can provide in regards to my second question. 

  • JDev10g and ADF/Struts input form errors

    I followed a demo for creating an input JSP form from Business Components. However, although I can create and run a report or read-only form without a problem, I cannot create and run an input form at all as I keep getting the following error:
    javax.servlet.jsp.JspException: No getter method for property FirstName of bean org.apache.struts.taglib.html.BEAN
         at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:968)
    Any ideas?

    Justin,
    This usually happen because the data binding called FirstName cannot be found in the binding container associated your JSP.
    The binding container associated with your page is most likely the name of your page with UIModel.xml.
    You can see the list of bindings available in the binding container by selecting the DataBinding.cpx file in the Navigator and look at the Struture Pane.
    The FirstName binding might not be thre of the wrong binding container may be associated with the page.

  • Preventing input form from showing existing record

    Hello,
    I'm creating a series of web pages to collect info from a user. On the first page, create.jsp, I have a CommandLink bound to the Create binding action. It forwards to the input form on its own page, form.jsp. The defaults (sequence number, creation date) from the model layer appear nicely in the form. If the user follows the page flow, the record is committed and everything is swell.
    The problem is that users can enter "form.jsp" directly into their location bar in their web browser, and the input page will display the first record in the table. I cannot use an authorization scheme to prevent access because any general user of the web should be able to input their info. (In other words, you can't be logged-in before creating your login.)
    How can I disable this? Or, is there a hook in the processing lifecycle that I can use to determine if a user has created a new row before displaying the input form?
    I'm using JDev 10.1.3 production, ADF Faces, ADF BC.
    Thanks,
    -Anthony

    I figured this out myself, actually this was quite simple.- just set the 'immediate' property on the component (button) to 'true'.

  • ActiveSync Input Form -- To take AD Resource name from Database column

    Hi All,
    My authorative source is a database table called dbTable.
    I am using an input form to provision into Active Directory. The Active Directory resource name is stored in a dbTable column. I first tried to hardcode the name of AD and do the provisioning, it worked. But wen I tried to take the name of the AD from my dbTable column using
    <Field name='waveset.resources'>
    <Comments>Add the AD account user inducted.</Comments>
    <Expansion>
    <block trace='true'>
    <filterdup>
    <appendAll>
    <ref>waveset.resources</ref>
    <list>
    <ref>activeSync.resourceNm</ref>
    </list>
    </appendAll>
    </filterdup>
    </block>
    </Expansion>
    <Disable>
    <block trace='true'>
    <neq>
    <ref>feedOp</ref>
    <s>create</s>
    </neq>
    </block>
    </Disable>
    </Field>
    It didnt work.
    Plz, can anyone tell me how to bring the name of the AD resource in my input form for provisioning into that AD.
    I need help. Plz treat it as urgent coz i can't move further without this being solved.

    Hello, first try to trace the value, using <ref>activeSync.resourceName</ref> should work,
    also read the example in Identity Manager documentation (PDFs) called: "Example: Disabling Accounts through ActiveSync Capable Adapters"
    Regards,
    Edgar Torres

  • ADF input form, changing mode to input rather than display

    aim of what i am tring to do:
    create an input form using ADF and UIX which accepts input and moves to a different page.
    approach taken:
    I have a data control based on a business component created from a database table. I have dragged the columns onto a UIX page as an input form without navigation.
    the problem/question:
    how do i set the data controls mode to create upon displaying the page? I want the page just to accept input and submit. it will never be used for displaying data, which is its current default state.
    i have tried calling the create method of the data control from a few places, but i am not sure where the correct place to call this is.

    You can create a dataaction before the page is called and drag the Create method on to it.
    Or you can add the create method as a button to the page that will end up calling your insert page.
    http://www.oracle.com/technology/obe/obe9051jdev/ADFWorkshop/BuildingADFApplicationsWorkshop.htm

  • Problems while creating a batch input

    Hi Experts,
    I tried to create a batch input program for the transaction CRMD_ORDER for some changes on to the configuration tab to enable the BOM to work. This cannot be done by the BAPIs. I have included the batch input program in a RFC enabled function module to do this job. I am getting the error control framework: fatal error - GUI cannot be reached  and Runtime error RAISE_EXCEPTION has occured. This happens only in the mode N, if i re run the session with the other modes there are no problems.
    I am call the function module through a method in the controller class.
    Replies are highly appreciated.
    Thanks in Advance.
    Regards,
    Suthagar

    Hi Durai,
    I tried that option too. Ufortunately the same error has happened. The problem is solved using 3 other function modules, by not using the BDC.
    Appreciate your reply. Thanks!
    Regards.
    Suthagar

Maybe you are looking for