Help needed to implement both Action and TextListener

This my code. How can i use ActionListener for the conv button and yet retrive the values from my textFields like TextListener. You may adjust the code so I can relly learn whats the trick. Try to add the difference in between the spaces so I can see the difference Thank you!!
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class project extends Applet implements ActionListener {
TextField TT,UNIT,unit,PVmax,PVmin,max,min,Table;
Button conv;
String UNIT1 = null;
String unit1 = null;
double PVmax1 = 0;
double PVmin1 = 0;
double max1 = 0;
double min1 = 0;
double PV1 = 0;
public void init() {
     TT=new TextField();
     UNIT=new TextField();
     unit=new TextField();
     PVmax=new TextField();
     PVmin=new TextField();
     max=new TextField();
     min=new TextField();
     Table= new TextField();
          Panel p = new Panel();
p.setLayout(new GridLayout(9,2,5,5));
p.add( new Label("Enter transmitter type"));
p.add( new Label());
p.add( new Label("(e.g. Pressure,Level,Flow etc.) :"));
p.add(TT);
p.add( new Label("Enter PV unit:"));
p.add(UNIT);
p.add( new Label("Enter Max. Sensing PV value:"));
p.add(PVmax);
p.add( new Label("Enter Min. Sensing PV value:"));
p.add(PVmin);
p.add( new Label("Enter transmitter Output Unit:"));
p.add(unit);
p.add( new Label("Enter transmitter max. Output:"));
p.add(max);
p.add( new Label("Enter transmitter min. Output:"));
p.add(min);
p.add( new Label("Enter table length :"));
p.add(Table);
add(p);
conv = new Button ("Start Conversion");
add(conv);
conv.addActionListener(this);
public void actionPerformed (ActionEvent event) {
PV1 = PVmax1-PVmin1;
repaint();
public void paint (Graphics g) {
PV1 = PVmax1-PVmin1;
g.drawString(" Pressure Transmitter Conversion Table " ,10,320);
g.drawString(" Transmitter Input (" + UNIT1 + ")" ,10,350);
g.drawString(" Transmitter Output (" + unit1 + ")" ,200,350);
g.drawString("PV value " + PV1 , 1,360);

public void actionPerformed (ActionEvent event) {
    Unit1=Char.parseChar(unit.getText());
    max1=Integer.parseInt(max.getText());
    PV1 = PVmax1-PVmin1;
}not sure whether it will work u must try.....

Similar Messages

  • Troubleshoting help needed:  My iMac keeps crashing and restarting with a report detail: "spinlock application timed out"  What can I do to fix this?timed out"

    Troubleshooting help needed:  My iMac keeps crashing and restarting with a notice: "Spinlock application timed out"  What can I do?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the page that opens.
    Select the most recent panic log under System Diagnostic Reports. Post the contents — the text, please, not a screenshot. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header and body of the report, if it’s present (it may not be.) Please don't post shutdownStall, spin, or hang reports.

  • How do I stop needing to scroll both horizontal and vertical in my folders to see all of the content.

    How do I stop needing to scroll both horizontal and vertical in my folders to see all of the content.

    There is no cancel button.
    I don't see a download all button that will download everything from iCloud anyway. The download all button that I see refers only to the particular artist or album that you select from the left had side. I see no download all button for TV Shows or Movies.

  • Need to perform both Queue and stack operations in Visual C# code

    Need to perform both Queue and stack operations, is any Data Structure available for this. or how can i custom create the structure for this?

    Hi,
    In this structure contains base logics of Queue and Stack. Well stack plays major role here with operations of PUSH, POP with additional operation of Queue i.e., ENQUEUE and DEQUEUE.  Here the stack has enqueue and dequeue 
    https://code.msdn.microsoft.com/The-Stacked-Queues-An-11f3703a
    Regards,
    Selva Ganapathy K

  • I am using PS cs6 and lightroom and I am having a hard time know what color space to choose.  The lab that I am using told me that their color space is sRGB.  Do I need to have both PS and Lightroom set at sRGB or should I have PS set at adobe RGB and jus

    I am using PS cs6 and lightroom and I am having a hard time know what color space to choose.  The lab that I am using told me that their color space is sRGB.  Do I need to have both PS and Lightroom set at sRGB or should I have PS set at adobe RGB and just set my export from lightroom as sRGB?

    Please post in the Photoshop forum.
    http://forums.adobe.com/community/photoshop
    Bob

  • URGENT PLEASE HELP - Can I install BOTH panther and tiger?

    Hi,
    I recently upgraded to Tiger only now to find out that some software I use is only compatible with Panther. I really like the whole Tiger experience and am therefore very hesitant to switch back to Panther.
    I understand that I might be able to somehow partition my hard drive so that I am able to run both Tiger and Panther (I have no idea how to even go about doing this...I'm a bit technically unsavy).
    ANY help you may be able to offer is HIGHLY appreciated.
    Thanks guys (and gals)!

    To partition your hard disk, restart your machine from a Mac OS X install disk and open the Disk Utility when you are able to. Select your hard disk in the list of disks, click Partition, and set up the partition structure. Confirm that you want to partition the hard disk; doing this will erase everything currently on the hard disk. You will need to create one partition for each version of Mac OS X that you want to run; a Mac OS X boot partition must be in either Mac OS Extended, Mac OS Extended (Journaled), or UNIX file system format. More information is available in this article.
    (8988)

  • Urgent help needed!! Layout table and Draw layout cell dissapeared.

    I need some urgent help. I'm using CS3 but for a while my
    Layout Table and Draw Layout Cell icons appear greyed and can't use
    them at all. Is there any kind soul out there who knows how to fix
    this? I'm going nuts trying all the possible options but none seem
    to work.
    Help please!!!!!!

    > How would you about designing a page without using html?
    You don't. But I don't recall suggesting that you not use
    HTML. I just
    suggested that you use best-practice HTML, no? Or maybe you
    meant to ask
    how you would go about building your site without learning
    HTML? In that
    case, I think you are outta luck. Using DW without knowing
    HTML is a very
    punishing experience, I'm afraid.
    > PS: A virtual box of 12 bottles of Moet Chandon is
    already on your way!!
    I'd prefer Cristal, please.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Untersberg" <[email protected]> wrote in
    message
    news:g4tj9a$m5o$[email protected]..
    > Ahhhhhh!!!!! They came up!!!! They came up again!!
    > I was on standard mode. Now going back to your
    suggestion, which I really
    > appreciate. How would you about designing a page without
    using html? I'm
    > just
    > redesigning my website at the moment and need it to get
    going urgently,
    > hence
    > the reluctance to start learning HTML at the moment.
    I'll do after but I
    > need
    > to get this up and running fairly quickly.
    >
    > Cheers.
    >
    > PS: A virtual box of 12 bottles of Moet Chandon is
    already on your way!!
    >

  • Help Needed in Creating Java Class and Java Stored Procedures

    Hi,
    Can anyone tell how can i create Java Class, Java Source and Java Resource in Oracle Database.
    I have seen the Documents. But i couldn't able to understand it correctly.
    I will be helpful when i get some Examples for creating a Java Class, Java Source and Stored Procedures with Java with details.
    Is that possible to Create a Java class in the oracle Database itself ?.
    Where are the files located for the existing Java Class ?..
    Help Needed Please.
    Thanks,
    Murali.v

    Hi Murali,
    Heres a thread which discussed uploading java source file instead of runnable code on to the database, which might be helpful :
    Configure deployment to a database to upload the java file instead of class
    The files for the java class you created in JDev project is located in the myworks folder in jdev, eg, <jdev_home>\jdev\mywork\Application1\Project1\src\project1
    Hope this helps,
    Sunil..

  • Help needed with 3rd party software and Windows XP on MacBook

    My Brother embroidery software has stopped working on the XP side of my MacBook. After all kinds of uninstalling and installing with support from Brother, they decided the problem is not the software and I should "contact my computer company." Since this is really a Mac, would Apple be able to help me with a Windows issue? The genius bar said no, Microsoft says no, so what is the point of buying a using a dual platform machine if no one takes responsibility for helping? I'm very frustrated and could use help from someone who works on both platforms.

    *"would Apple be able to help me with a Windows issue?"*
    Sorry, but no. Apple does not support third party operating systems and applications.

  • Need to deploy both Visio and Project 2010 by GPO

    I'm looking for a way to deploy Visio and Project 2010 to selected users without SCCM.
    I tried a logon script based on the one Microsoft posted as a sample in Technet and it worked for some users, but is unreliable.  When the users need both Visio and Project, it would error out because it says 2 setup files can't run at the same time.
     So, I set a GPO for logon scripts to run synchronously and it worked for some users, but others would get a black screen at logon that would hang forever.  Seems to me this is UAC interference with no UAC prompt being popped up.  When the script
    was disabled, they could log on normally.
    I thought of startup scripts, but that does not show the user that the software is installing, so they think their computer is stuck booting.
    What are solutions?

    This is the login script I'm using for Visio 2010.  I just substitute the work Visio for Project to make a login script for Visio.  
    It works but the part where it is supposed to recognize that the product is already installed and not install again doesn't work.  can you see an error or other reason why?
    setlocal
    REM *********************************************************************
    REM Environment customization begins here. Modify variables below.
    REM *********************************************************************
    REM Get ProductName from the Office product's core Setup.xml file, and then add "office14." as a prefix. 
    set ProductName=Office14.Visio
    REM Set DeployServer to a network-accessible location containing the Office source files.
    set DeployServer=\\server01\userapps\VisioPro2010
    REM Set ConfigFile to the configuration file to be used for deployment (required)
    set ConfigFile=\\server01\userapps\VisioPro2010\Visio.WW\config.xml
    REM Set LogLocation to a central directory to collect log files.
    set LogLocation=\\server01\userapps\VisioPro2010\logs
    REM *********************************************************************
    REM Deployment code begins here. Do not modify anything below this line.
    REM *********************************************************************
    IF NOT "%ProgramFiles(x86)%"=="" (goto ARP64) else (goto ARP86)
    REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
    :ARP64
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
    if NOT %errorlevel%==1 (goto End)
    REM Check for 32 and 64 bit versions of Office 2010 in regular uninstall key.(Office 64bit would also appear here on a 64bit OS) 
    :ARP86
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
    if %errorlevel%==1 (goto DeployOffice) else (goto End)
    REM If 1 returned, the product was not found. Run setup here.
    :DeployOffice
    start /wait %DeployServer%\setup.exe /config %ConfigFile%
    echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt
    REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
    :End
    Endlocal

  • Everytime I try to open a creative cloud product, the program closes. I need to use both illustrator and indesign for school and I was wondering if anyone had any advice on how to actually make the program work?

    If anyone has any advice on how to make creative cloud programs work please let me know!
    Any help is appreciated.

    These questions below may be for a different product... but the KIND of information you need to supply is the same, for the products you use
    More information needed for someone to help... please click below and provide the requested information
    -Premiere Pro Video Editing Information FAQ http://forums.adobe.com/message/4200840

  • Help - Tech Support Lost my Actions and Custom Panels

    Lord only knows what else I've lost.  (CS6 - 64 bit) Anyhow, somehow my blur gallery (Tilt-Shift, Iris and Field)  got screwed up.  Whenever I brought them up, they wouldn't work and I couldn't get out of the gallery.
    I called tech support and after taking control of my computer, he reset my Preferences and all was well - or so I've thought.  Now I find I've lost my custom Actions and Panels.
    Is there a way to retreive these and other things I may have lost, or must I start from square one?
    Gerry

    Noel Carboni wrote:
    Do you have a backup of your preferences area?
         Sorry I'm just getting back to you folks.  I found where CS6 keeps my preferences.  Then I went to my NAS to find the file backups and after reloading my backup program (long story) I eventually copied all the stuff back to where it was supposed to go.
         Thanks everyone; I'm back up until the next time Photoshop surprises me with the unexpected!
    Gerry

  • Flex 3 :Help needed in implementing View States

    Hi 
    I am new to Flex , i am trying to understand View States , tried for one hour but got confused .
    (Basically by seeing the examples i understood the concept , but failed to implement ) 
    Please help .
    Assume my requirement is at the load of the page , i want to show an Login Button and a Chnage State Button (common button) only .and when the Change State button is clicked on ,i want to show the Register Button .
    So for this i made two Forms , and a common button .
           <mx:Form id="RegForm">
                <mx:Button label="RegFormButton" id="RegFormButton"/>
            </mx:Form>
            <mx:Form id="loginForm">
                        <mx:Button label="LoginButton" id="loginButton"/>
            </mx:Form>
    <!-- A common button for both the States-->
      <mx:Button label="Change State"
                  click=""/>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" currentState="Register">
    <mx:states>
    <mx:State name="Register">         
    <mx:SetProperty   target="RegForm"   value="Register"/>
    </mx:State>
    <mx:State name="loginForm">
    <mx:SetProperty   target="loginForm"   value="Login"/>
    </mx:State>
    </mx:states>
    ( I think some how i can write the Logic to chnage to the current state to loginForm when user clicks with some inline code , but please tell me At the start of the page please tell me why I am not able to show the Register.

    sorry for posting a dumb question .
    I realized my mistake .

  • Help needed : How to move OCR and Voting Disk

    Hi all experts...
    I am Mahesh. Working in DXB as DBA. We have serveral RAC installed clients. Among those one major client wants their OCR and Voting Disk to be moved from existing SAN to a new SAN which will be configured. Only OCR and Voting Disks needs to be moved.
    Details:
    =====
    Oracle Clusterware,ASM and DB version 10.2.0.3.0
    Windows 2003 Server Enterprise Edition
    2-Node RAC
    OCR and Voting disks are on RAW devices (not on CFS or NFS)
    I have read the clusterware administration document and also Metalink Note 428681.1 for the same.
    But it does not contain information how to move it to another new RAW in a new SAN device. (we need to keep it in raw device itself)
    How to identify the new disk path from windows operating system ? Then only we can move the OCR and VD right ???
    Help me for the same please...
    Thanks & regards,
    Mahesh.

    Hi Mashes,
    Could you list out the steps you did after you create the link on the new SAN using GUIObjectManager.exe?
    I tried on my VM and also in customer's test environment but I only successful using the following steps
    1. shutdown asm service, database service, listener service, CRS, EVM and CSS
    2. Object Manager Service is kept running
    3. from both nodes I issued the following command
    ocrconfig -repair \\.\OCRPRIMARY
    ocrconfig -repair \\.\OCRMIRROR
    4. according to metalink id 428681.1, I should do the following
    ocrconfig -overwrite
    However I was not successful because that command returns an error message (PROT-1: Failed to initialize ocr config).
    Therefore, I ran the following command
    ocrconfig -restore D:\oracle\1020\CRS\cdata\crs\backup00.ocr
    5. after that command, ocrcheck giving me the result and the ocr primary and mirror have been moved to the new partition.
    6. start the whole services starting from CSS, EVM, CRS, ASM, Listerner and Database service.
    Although what I experienced seems a bit weird and not the same as what was written in metalink, the RAC is running fine until now.
    What I would like to know is your experience on this. May be you can share it here.
    Thank you,
    Adhika

  • Help needed for as3 dropdown menu and html

    First of all hello!  I have to create a html website for a company. The design i've made is in photoshop ....and i have to create a dropdown menu. The first question is : Can i create the dropdown menu in flash without having to use html frames? Can i link one of the buttons of the menu in a html page so that it loads in the same browser window another html page (if so .... with what function?)?  Please ... i need to know ... because i simply prefer to implement it in flash rather then html. And the second big question is : Can the stage in flash be transparent? Because if i make the menu in it, it will be impossible to match any dimensions of the stage .... and i would like to embed it into a html page...if possible without the stage color >..... Thanks in advance!!!!    Tudor

    For opening pages you want to look into using the navigateToURL() function.  The help documentation provides information abiout it an how to control the window aspect as well.
    To make the stage transparent is more of an html aspect than a Flash aspect, though you can set it up to publish that way.  The key is to set the wmode paraemter that is in the html embedding code to "transparent".  I am not sure if all browsers supports this feature, but I think more are willing to.

Maybe you are looking for

  • Search is not working in HCM9.1 , pt8.52 after install

    Hi I just installed HCM9.1 with Peopletools 8.52 on windows xp 32bits with Oracle 11g. This is my first install ever. When I login online the search does not work (when i click search on any page that has a search record it just shows that progress g

  • Multiple Logical Table Sources vs Single Logical Table Source

    OBIEE 11g. I am totally confused. Can someone help me with the following for me. I have seen logical table sources being used in 2 ways. I have a 2 sources tables: CUSTOMER & ADDRESS. In physical layer these 2 tables are linked by CUSTOMER _ID in a 1

  • Regarding crystal report basic 2008

    Dear sir, i had  created two commands in crystal report and retrieving data using where conditions in select query . and after that i also clear all link between two commands but still it takes the link automatically and i am not able to get my real

  • How to call logical database

    hi friends,     plz explain me how to call logical database in a report program?

  • Sender Service for Client Proxy in Receiver Det step ?

    Hello guys : just to check will the sending business system for receiver det step in ,client proxy to file ,will be the name of R/3 Business system (where the client proxy is configured) ? Please confirm Krishna