Adding a condition in GUI

I have a main GUI file which is like the test file and I have an AddwardenDialog file i need to get the value entered in theWardenRank from AddWardenDialog to use in my main GUI file to determine a condition relating to something else.
So just want to know how I can copy this value from AddwardenDialog to main testing GUI file
          add (new JLabel("Enter Warden Rank:       "));
          theWardenRank = new JTextField(20) ;
          add (theWardenRank);Thankyou

noone got any idea's of how to do this then? HELP lol
I've got another problem as well adding a search method in GUI
non GUI version
Prison.java
public void SearchPrisonersFOR(JTextArea displayArea)          {               for(Person nextPrisoner : thePersons)
                    if (nextPrisoner instanceof Prisoner)
                              Prisoner p = (Prisoner) nextPrisoner;
                                   if (p.getPrisonerID().equals(id))
                                        displayArea.append("\n" + p);
TestPrison.java
//Search for Prisoner by ID               
                    case 6:
                         System.out.println("Enter ID to search");
                         id = kybd.next();
                         HMEssex.SearchPrisoners(id);
                         break;
                    }GUI
SearchPrisonersDialog.java
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class SearchPrisonersDialog extends JDialog implements ActionListener
     private JButton ok;
     private JButton cancel ;
     private JTextField id;
     public SearchPrisonersDialog(String sTitle, JFrame owner)
          super (owner, sTitle, true);
          setLayout(new FlowLayout());
          setSize(400,250);
          add (new JLabel("Enter Prisoner ID to search for:    "));
          id = new JTextField(10) ;
          add (id);
          ok = new JButton("Search");
          ok.addActionListener(this);
          add(ok);
          cancel = new JButton("Cancel");
          cancel.addActionListener(this);     
          add(cancel);
     //public Prisoner getPrisoner()
          //return thePrisoner ;
     public void actionPerformed(ActionEvent e)
          if (e.getSource() == ok)
               return id;
               //SearchPrisonersFOR(id);
          else if (e.getSource() == cancel)
              // data entry cancelled
              id = null;
          dispose();
}how do I add a method into Main GUI TestPrisonGUI.java, so that my search method will work
2 problems to solve now
Thankyou

Similar Messages

  • Sales Order creation of adding new condition type to Item

    Hi Expert,
    The sales order has been created and need to add new condition type (Z601) to the first item(10). While adding the condition I am getting warning message like
    "Item 000030 exists already; the entry will be ignored".
    Where item 030 will be the last item.
    I have cheked but it's a standard report SAPFV45P, we can't modify. Please let me know can we set any field in the sales order so that we wont be getting this message.
    Regards,
    Mahesh

    Hello,
             If you would like to add the Condition Type automatically for a specific Item based on some condition (Lets say, Item Category), then you can code a Pricing Routine in VOFM Transaction and it will be automatically assigned.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • Adding pricing condition type  while complaint creation

    Hi,
    I want to add condition type , whille calim creation. I have written the Zpgm using crm_ordwer_maintian , we can do that.
    But the problem is I need to put in some BADI, i tried order_Save and pricing_I badi.
    But it gives dump 'maintian'  bapi in the order_Save. I treid with 'multi_ow'  but its not adding the condition type.
    Please help me , where I need to put this code ?
    Thanks,
    Sushant

    heyy, its working fine , some parameter missing.

  • Tutorial: 8 Adding a Conditionally Dependent Field

    Hi,
    I am trying to implement chapter 8 Adding a Conditionally Dependent Field. However, the Commission percentages stays enabled no matter what the value of the jobid is.
    Is this a bug or am I doing something wrong here?
    Thanks, Joep

    Joep,
    If you send your testcase for the LOV problem, we will also look at this issue.
    The conditionally dependent items work for me, so may be you made some typo.
    Steven Davelaar,
    JHeadstart Team.

  • Adding link on SAP Gui logon page

    Hi All,
    I have the problem that I need to add a link on the SAP Gui logon page.
    Within the transaction SE61 I have added the general text ZLOGIN_SCREEN_INFO.
    When I click on the Insert Command I have the possibility to create a link but the char. format F4 list is empty and it does not accept the link creation without it being filled.
    Does anybody have an idear?
    Thank you for your help
    Soeren

    Hi Juan,
    When I click on the Insert Command I have the possibility to create a link but the char. format F4 list is empty and it does not accept the link creation without it being filled.
    Would you please comment on this ?
    I have also seen the only possibility... but same issue...
    Regards.
    Rajesh Narkhede

  • Very Urgent--Adding Header condition amount in Net order value of PO

    Dear friends,
    Our client has following requirement.
    ---In Purchase order ,Header conditions related to delivery costs are using.
    --Currently when we add the header condition,that amount is not adding to the Net order value and not adding to the total value in the PO print document.But proportionaly distributing to the line items.
    --Because of this two problems one is not adding to net order so not considered for release strategy,secondas it is not adding in the net order value,header condition amount also is not coming in the total value in the print out.
    --Currently, this header amount is splitting and posting seperate line item for GR/IR clearing act in MIGO and MIRO..
    I have removed the Statistical tick and accrual tick in IMG, then header amount is adding to the Net order value and adding in the total value in the PO print. But in MIGO/MIRO, This amount is adding to the GR/IR clearing act ,instead of seperate GR/IR line item in MIGO/MIRO documents, But client wants the postings shall be made similar to previous one.
    I have checked with removing only Stastical key and not removing the accrual key.But header condition is not adding to Net order value. I have searched for User exits/BAdis,suitable are not found.
    How the Header condition amount can be added to the Net order value without removing the Statistical key in IMG.Are there any User exit/BAdis,
    Please suggest.
    Regards,
    Dayanand

    Dear Sairam,
    Thanks for your reply.
    Asper your suggestions i tried as follows.
    1) We have got condition types like surcharges/discounts before "Net inc dis"
        and Delivery costs/accruals/frieghts after "Net inc dis".
    2) My requirement is that whatever conditions types after Net inc dis like Del costs/Frieghts are not included in Net order value in PO,so amount is not included in Release strategy and print.Currently this amount is coming as seperate line itemGR/IR Clearing account in MIGO/MIRO.
    3) Asper your suggestion,i tried with Surcharge  condition existing before "Net inc Disc"--This is a header condition(Cond.cat is Insurance),but stastical tick is not there in Scema. I tried as it is ,amount is adding in Net order value.But seperate line item for this amount is not coming in MIGO/MIRO
    4) When i ticked the accrual key and statistical tick and added Accrual-FR1,then PO created ,amount is not adding in Net order value.
    5) When i removed only Stastical tick only even though amount is not adding.
    6) When i removed the Accrual tick also i.e both the ticks then only amount is adding in Net order value.But Line item of the header condition is not dispalying as a seperate line item in MIGO/MIRO
    For these Header conditions ,seperate line item shall come ,at the same time amount shall add in Net order Vaue for the purpose of including in the amount for Release strategy and print.
    Please suggest how to do it.
    Regards,
    Dayanand

  • Adding manual condition types to a service contract

    Hi,
    I need to add a manual condition type and price value at billplan line item level in a service contract. Could anyone please let me know any way of adding it after the service contract has already been created?

    Hi,
    You need to first create the Condition type which can take manual entries or the manual entries are prefered.
    Then add the Condition type to the pricing procedure being determined in service contract.
    Once done when you go to edit mode in conditions tab you shoudl be able to add the above condition types.
    Regards,
    Tanu

  • DNS adding entries via SA GUI

    I am configuring a new Intel Xserve with 10.5.2 ready to move data from my current 10.4.11 system
    I have added over 100 entries into DNS via the Server Admin GUI by hand.
    (I tried using the move the data files and then using the convert utility. It kept missing and corrupting data).
    I have added most of my records apart from a few A records and CNAMEs, however when I click on "add entry", there is no "new entry" created. In fact I cannot seem now to add any entries to DNS via GUI.
    The GUI is the preferred entry point as other colleagues may need to add to DNS in my absence.
    I have stopped DNS, restarted, rebooted the system.
    The following is in /var/log/system.log it is complaining about not having a nameserver, but it does.
    Any help would be appreciated.
    Apr 3 09:48:26 adminservices servermgrd[89]: servermgr_dns: Failed to save zone '(null)' because the zone does not have a nameserver.
    Apr 3 09:48:55: --- last message repeated 3 times ---
    Apr 3 09:48:55 adminservices Server Admin[271]: Unexpected call to doMarkConfigurationAsDirty by 'DNS' plugin during updateConfigurationViewFromDescription
    Apr 3 09:52:30 adminservices Server Admin[271]: Unexpected call to doMarkConfigurationAsDirty by 'DNS' plugin during updateConfigurationViewFromDescription
    Apr 3 09:53:00: --- last message repeated 1 time ---
    Apr 3 09:53:17 adminservices Server Admin[271]: Unexpected call to doMarkConfigurationAsDirty by 'DNS' plugin during updateConfigurationViewFromDescription
    Apr 3 09:55:06 adminservices servermgrd[89]: servermgr_dns: Failed to save zone '(null)' because the zone does not have a nameserver.
    Apr 3 09:55:36: --- last message repeated 3 times ---
    Apr 3 09:56:24 adminservices Server Admin[271]: Unexpected call to doMarkConfigurationAsDirty by 'DNS' plugin during updateConfigurationViewFromDescription
    Apr 3 09:57:08 adminservices servermgrd[89]: servermgr_dns: Failed to save zone '(null)' because the zone does not have a nameserver.
    Apr 3 09:57:15: --- last message repeated 3 times ---
    Apr 3 09:57:15 adminservices Server Admin[271]: * -[GroupTextField windowDidResignKey:]: unrecognized selector sent to instance 0x1000e130
    Apr 3 09:57:22: --- last message repeated 1 time ---
    Apr 3 09:57:22 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRAxes computeLayout]:1124 - plotRect height = 0.000000 <= 0.0 *
    Apr 3 09:57:22 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRChartView computeLayout]:1194 - Layout for overlay axes (0x13eebd00) failed. *
    Apr 3 09:57:22 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRAxes computeLayout]:1124 - plotRect height = 0.000000 <= 0.0 *
    Apr 3 09:57:22 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRChartView computeLayout]:1194 - Layout for overlay axes (0x13eedef0) failed. *
    Apr 3 09:57:23 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRAxes computeLayout]:1124 - plotRect height = 0.000000 <= 0.0 *
    Apr 3 09:57:23 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRChartView computeLayout]:1194 - Layout for overlay axes (0x13eebd00) failed. *
    Apr 3 09:57:23 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRAxes computeLayout]:1124 - plotRect height = 0.000000 <= 0.0 *
    Apr 3 09:57:23 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRChartView computeLayout]:1194 - Layout for overlay axes (0x13eedef0) failed. *
    Apr 3 10:05:08 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRAxes computeLayout]:1124 - plotRect height = 0.000000 <= 0.0 *
    Apr 3 10:05:08 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRChartView computeLayout]:1194 - Layout for overlay axes (0x13eebd00) failed. *
    Apr 3 10:05:08 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRAxes computeLayout]:1124 - plotRect height = 0.000000 <= 0.0 *
    Apr 3 10:05:08 adminservices [0x0-0x12012].com.apple.ServerAdmin[271]: * ERROR: -[GRChartView computeLayout]:1194 - Layout for overlay axes (0x13eedef0) failed. *
    Apr 3 10:05:43 adminservices com.apple.launchd[1] (0x416a30.Locum[22193]): Exited: Terminated
    Apr 3 10:32:57 adminservices sshd[22755]: USER_PROCESS: 22755 ttys000
    Apr 3 10:32:57 adminservices com.apple.launchd[1] (0x416cc0.sshd[22755]): Could not setup Mach task special port 9: (os/kern) no access

    Funny thing, we just upgraded our xserve from 10.3.9 to 10.4.11 and our DNS is having problems as well. Never has a problem before. Whines and complains that it doesn't know who "xserve" is and does not associate "xserve" with its local IP address.
    Maybe what will help you may help us.
    Ever since the upgrade, Windows file-sharing has gotten horribly gummy.

  • Adding Help to a GUI

    I'm a bit new at making GUI's in java. I need to add a help option in my GUI by having a question mark at the right top corner of the window that once clicked when you hover over certain areas in the GUI it will provide help. does anyone know a good place for me to start looking (it's hard to google for it) or give me some starting code?
    Thank you

    Do you want one in the title bar? If so forget it. While you can do it, it would be very hard to do. (1)
    Having a "help" button somewhere else on the window would be easy.
    It could be done by having an action listener changing the mouse cuser on the Window curser, most likely to a custom curser. Then adding mouse listeners to everything that can be "helped". Which consumes the event (so the action listener on buttons is not fired), removes itself from all that it had been added to, and opens the help window for the object picked.
    1) To change the title bar requires JNI, or making a Custom L&F, and having that be able to add a "help" button

  • Adding rebate condition to invoice

    Hi all,
    I have a requirement to add a rebate to invoices exceeding a purticular limit.
    I have added the rebate condition to the list of pricing conditions using the exit USEREXIT_PRICING_PREPARE_TKOMP.
    The rebate calculation is working fine but the problem that i am facing is that, when i take the pricing conditions in VF01 it will show the rebate condition that i attached and the associated rebate percentage; but the rebate will not be applied to the net amount. Only when i press enter or press activate button the rebate gets calculated and applied to the net amount.
    My requirement is such that the rebate should get applied during the invoice generation itself without the user having to do anything.
    Can anyone help me in solving this problem.
    Regards,
    Roshan

    Hi Mahulenka,
    Thanks for your reply.
    I am not sure whether it can be done that way. Here the rebate percentage alters with customer. For each customer there will be a certain minimum amount limit for applying the rebate. Once the invoice amount exceeds this limit the rebate percentage for that customer is to be applied.
    Rebate percenteges along with the minimum amount limit will be stored in an Ztable. Since the rebate percentage alters with the customer, I don't think it can be done by configuring the pricing procedure.
    In the userexit I am querying the Ztable to find the limit amount and rebate percentage. I am also trying to calculate the rebate amount and move it to KBETR field of the XKOMV structure; but that amount is not getting displayed in VF01.
    I'm sorry that i didn't explain the scenario completly in my first post. I hope that i have now made it clear now.
    Thanks & Regards
    Roshan

  • Programatically adding Format Conditions

    I understand that Access 2013 will allow up to 50 conditional formats on each control. However when I try adding more than 3 programmatically using [Control].FormatConditions.add I get
    Run-time error '7966': The format condition number you specified is greater than the number of format conditions.
    The error doesn't occur with FormatConditions.add but occurs when I try assigning one of the formats (in my case .BackColor)
    Is there a fix for this issue?
    Kind Regards
    Paul

    Hi Paul Simpson.
    >>I don't get an error when adding more than three in vba, Only when I assign formatting later to one that is more than 3 that I get the error as per example<<
    I am trying to reproduce this issue however failed. And based on the error message, it seems the index of formatconditons collection is incorrect.
    Here is the code test to add a condition format and set its back color programatically. The code works well for me:
    Sub SetCondiditonFormat()
    Dim aTextBox As TextBox
    Set aTextBox = Application.Forms("table10").Controls("Name")
    Set ofc = aTextBox.FormatConditions.Add(acFieldValue, acEqual, "Jack4")
    ofc.BackColor = RGB(0, 255, 0)
    End Sub
    And if I get the format condition with a incorrect index(40 which is greater than the max index value), I would get the same error message:
    Sub SetCondiditonFormat()
    Dim aTextBox As TextBox
    Set aTextBox = Application.Forms("table10").Controls("Name")
    aTextBox.FormatConditions(40).BackColor = RGB(255, 0, 0)
    End Sub
    Would you mind sharing with us a demo to help us narrow down this issue? You can upload it via OneDrive, and please remove the sensitive information before you uploading.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Adding OR condition gives ORA-00920 error

    I am trying to write a xquery like this -
    for $VAR3 in document("DS")/db/V_ViewName where (($VAR3/CODE eq $#PARAM of type xs:string) or (xf:empty($#PARAM of type xs:string)))
         return
         <stuff>
              <stuff_name>{  treat as xs:string(xf:data($VAR3/STUFF_NAME)) }</stuff_name>
         </stuff>
    But when I run the query in data view builder I get the following error -
    RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: EJB Exception:; nested exception is:
         java.rmi.RemoteException: Query Execution Error (Run Time) 1-2-3-9: Problem while accessing relational database. (com.enosysmarkets.xmediator.wrappers.rdbwrapper.cursormgr.CursorManagerException:
    (1-1)JDBC error occured:
    java.sql.SQLException: ORA-00920: invalid relational operator
    Why isn't this kind of query allowed?
    When an empty query param is passed I want it to return all the rows from the view.
    It should ignore the "where" if param is empty.
    Any clues?
    - vineet

    This is CR185494 on LD8.1 - Bad sql generated when a condition is folded into a boolean and pushed to a database.
    I will email the patch.
    - Mike

  • About adding a textfield in gui

    i wanted to add a textfield in my gui using gridbaglayout manageer with other buttons but instead of textfield only a line appears on screen where as all the buttons appears well

    Post the code where you are laying out your components.

  • Step for Adding new condition in Pricing procedure

    Hi,
      We have different pricing procedure  with different condition ,  in this procerdure i want to add one new  condition at 2 position and the requirement is that  if system found the value with this condition it should skip the 3 step and directly go to 4 step  can u give the step for this  how to add new condition to this procedure.
    regards,
    zafar

    I think you need to use condition exclusion so if the condition at step 2 is found then step 3 becomes inactive if it  is also found.
    Depnding on your pricing keys, you might be able to add a step in the access sequence on step 3 and only use a single condition (V/07) and marking that step exclusive if a record is found.

  • Adding A Pushbutton To GUI Status of Standard Program

    Hi,
    I need to add a pushbutton to the GUI status of one of the SAP standard programs, the system being <b>ECC 6.0</b>. One method which I tried was by copying the standard program as a Z program and then modifying the GUI status per my requirement. Although this works, one drawback in doing it this way was with the introduction of the new Enhancement Framework in ECC 6.0, the defined enhancements from the standard program were not copied to the Z program.
    I am looking for suggestions on how to add a pushbutton in the GUI status of the standard program using the enhancement concept. Please let me know the implications if any, while carrying out this change.
    Regards,
    Ravi Krishna

    GOTO Se41 Transaction ..
    one example :
    Standard Program : SAPLSLVC_FULLSCREEN
    Status : STANDARD_FULLSCREEN
    use ur program first and status and now click on copy status ...
    copy from standard to custom..

Maybe you are looking for

  • Pick Slip report gives 'No Data Found' output

    Hi All, Problem Statement: Iam unable to generate Pick release report, the shipping lines status is "ready to release" and we have a available quantity for the shipment. Step1 : Create a Order. Step2 : Save and Book the Order. Step3 : Pick Release th

  • SAP Query to join action infotype with additional action infotype

    We have created SAP Query on PA0000 which shows all actions that are executed for an employee. The problem is that if two actions are exceuted on the same day then it shows only one action instead of showing both the actions. As two actions are execu

  • Linksys and Mac

    Can linksys software work on a Mac? If so how do I get stated setting up the wireless? Hardware is wireless - N WRT150N. thanks for any help.

  • Not able to open ichat

    I have a MAC Book Pro with 10.4.11.. I am not able to open iChat. The application starts running when I click it, but the ichat window does not open up.. Did anyone face this problem before?

  • Uninstallation of Weblogic 10.3.1 on Window 7 64 bits

    Hi, I was trying to uninstall Weblogic from my Window 7 64 bit machine but it is neither showing error nor showing the console. I even tried to run the uninstallation using C:\Oracle\Middleware\utils\uninstall>uninstall -mode=console but it is showin