Help me with my different classes for Dialog/Listener problem

Class TodSource
//bunch of code
bEdit.addActionListener(new EditUrl(this));
//more code
OTHER classes
import java.awt.*;
import java.awt.event.*;
import java.net.*;
import java.io.*;
import java.applet.Applet;
public class EditUrl implements ActionListener{
     Frame OriginalOwner;
     EditUrl(Frame TodSourceFrame){
     OriginalOwner = TodSourceFrame;     
     actionPerformed(ActionEvent e) {
     new EditDialog(OriginalOwner, "Enter URL");
public class EditDialog extends Dialog{
     EditDialog(Frame OriginalOwner, String title) {
     super(OriginalOwner, title, true);
     addWindowListener(new CloseCross());
     setLayout(new FlowLayout());
setSize(250, 150);
     setResizable(false);
     show();
class CloseCross extends WindowAdapter {
     public void windowClosing(WindowEvent event){
          dispose();
when i compile i get this error
C:\Documents and Settings\Administrator\Desktop\Java Ref>javac TodSource.java
.\EditUrl.java:18: invalid method declaration; return type required
actionPerformed(ActionEvent e) {
^
.\EditUrl.java:28: class EditDialog is public, should be declared in a file name
d EditDialog.java
public class EditDialog extends Dialog{
^
.\EditUrl.java:8: EditUrl should be declared abstract; it does not define action
Performed(java.awt.event.ActionEvent) in EditUrl
public class EditUrl implements ActionListener{
^
.\EditUrl.java:54: cannot resolve symbol
symbol : method dispose ()
location: class CloseCross
dispose();
^
4 errors
hm, anyone can understand the problem

hi again,
sorry it takes such a long time
1. dispose() is a method normally used by frames, windows and so on
this method just only kills the frame, give the memory this frame used back to the system and makes the frame undisplayable.
So since i do not know what you want to dispose i cannot help you
2. actionperformed()
It works the following way:
every class implementing the interface ActionListener has to implement the method actionPerformed(ActionEvent e)
if you start the program you have to add this actionlistener to a graphiccomponent which can trigger an action(like buttons)
here a short example
import java.awt.*;
import java.awt.event.*;
public class Example extends Frame implements ActionListener {
public Example(){
   Button b = new Button("I am a button");
   b.addActionListener(this); // this will add our actionListener to this button
   b.setActionCommand("DoAnything"); // we need it, if we define more buttons, which uses the same listener
   add(b); // adding the button to our frame
public void actionPerformed(ActionEvent e){
if(e.getActionCommand().equals("DoAnything"))
    // insert here what you want to do
test it out                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      

Similar Messages

  • Please help me with the proper query for the below problem

    Hi,
    I have a table RATE which have two columns RT_DATE (date) and RATES(number).
    This table have following data.
    RT_DATE
    RATES
    1-JAN-2007
    7
    2-MAR-2008
    7.25
    5-JAN-2009
    8
    8-NOV-2009
    8.5
    9-JUN-2010
    9
    I wanted to get the rate of interest on 8-DEC-2009.
    Output will be 8.5 as this given date is in between 8-NOV-2009 and 9-JUN-2010. Could you please help me with proper query?
    Regards,
    Aparna S

    Hi,
    That sounds like a job for the LAST function:
    SELECT  MIN (rates) KEEP (DENSE_RANK LAST ORDER BY rt_date) AS eff_rate
    FROM    rate
    WHERE   rt_date < 1 + DATE '2009-12-08'
    MIN above means that, in case of a tie (that is, 2 or more rows with the exact same latest rt_date) the lowest rates from that latest rt_date will be returned.  In rt_date is unique, then it doesn't matter if you use MIN or MAX, but syntax demands that you use some aggregate function there.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for your sample data, and also post the results you want from that data.
    Point out where the statement above is getting the wrong results, and explain, using specific examples, how you get the right results from the given data in those places.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002#9362002

  • How to use the different class for each screen as well as function.

    Hi Experts,
    How to use the different class for each screen as well as function.
    With BestRegards,
    M.Thippa Reddy.

    Hi ThippaReddy,
    see this sample code
    Public Class ClsMenInBlack
    #Region "Declarations"
        'Class objects
        'UI and Di objects
        Dim objForm As SAPbouiCOM.Form
        'Variables
        Dim strQuery As String
    #End Region
    #Region "Methods"
        Private Function GeRate() As Double
                Return Double
        End Function
    #End Region
    Public Sub SBO_Appln_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean)
            If pVal.BeforeAction = True Then
                If pVal.MenuUID = "ENV_Menu_MIB" Then
                End If
            Else ' Before Action False
                End If
        End Sub
    #End Region
    End Class
    End Class
    Rgds
    Micheal
    Vasu Anna Regional Feeling a???? Just Kidding
    Edited by: micheal willis on Jul 27, 2009 5:49 PM
    Edited by: micheal willis on Jul 27, 2009 5:50 PM

  • How to acquire from various AI channels simultaneously with a different range for each one?

    How to acquire from various AI channels simultaneously with a different range for each one?
    In LabView I have found some examples but in C there isn't seem to be any.
    Solved!
    Go to Solution.

    Or you can add channels one by one with individual instructions: the follwing code compile and runs with no errors on a vitual daq device:
    err = DAQmxCreateTask ("", &taskH);
    err = DAQmxCreateAIVoltageChan (taskH, "Dev1/ai0", "AI0", DAQmx_Val_Cfg_Default, -5.0, 5.0, DAQmx_Val_Volts, "");
    err = DAQmxCreateAIVoltageChan (taskH, "Dev1/ai1", "AI1", DAQmx_Val_Cfg_Default, -10.0, 10.0, DAQmx_Val_Volts, "");
    DAQmxStartTask (taskH);
    err = DAQmxReadAnalogF64 (taskH, 5, 10.0, DAQmx_Val_GroupByChannel, val, 10, &read, 0);
    DAQmxClearTask (taskH);
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Can anyone help me with changing email address for resetting password notification

    Can anyone help me with changing email address for resetting password notification?

    If you know the answers to your security questions, you can change your rescue email address as shown in step 6 in this article: http://support.apple.com/kb/HT5312.
    If you don't kow the answers to your security questions or need other assistance doing this, either contact Apple for assistance by going to https://expresslane.apple.com, then click More Products and Services>Apple ID>Other Apple ID Topics>Lost or forgotten Apple ID password, or contact the Apple account security team: http://support.apple.com/kb/HT5699.

  • Please help me with msi installer file for 11.6.8.* as this is our standard version which we use for all machines in our organization

    please help me with msi installer file for 11.6.8.* as this is our standard version which we use for all machines in our organization

    arai-c wrote:
    I have full version of this software but I am not able to install it silently because it always gives Google toolbar pop up which We dont required
    arai-c wrote:
    the problem is we dont have msi file for 10.6.*.* and hence I am not able to create package for it
    I don't understand; two days ago you wrote that you have it, now you don't...?
    If you don't have it, then why not deploy the current version 12.1.3.153 - I don't see the point of installing an old, unsecure software version.

  • Hi! Can someone help me with repair service address for Palm TX?

    Hi! Can someone help me with repair service address for Palm TX?
    This question was solved.
    View Solution.

    Good luck, and please let us know here how it works out for you.  We love knowing of current resources who can help solve people's problems with these older devices.
    smkranz
    I am a volunteer, and not an HP employee.
    Palm OS ∙ webOS ∙ Android

  • Hi. I have an ipod 7th Gen. Whenever i rate a song from ipod, when i connect my ipod to my pc i see that  another different song is rated on itunes. Can you help me with it? or what causes this problem?

    Hi. I have an ipod 7th Gen. Whenever i rate a song from ipod, when i connect my ipod to my pc i see that  another different song is rated on itunes. Can you help me with it? or what causes this problem?

    Hi Becki ..
    You need to "authorize" the Mac.
    Launch iTunes on the Mac then from the iTunes menu bar top of your screen click Store > Authorize This Computer.
    Now, using the same Apple ID as you used to purchased iTunes media originally, you should be able to sync all your content.
    More details here >  iOS: Syncing with iTunes

  • Please help me with choosing the Hardware for my new computer

    I am creating a new editing machine that i will be using After effect, photoshop, flash, illustrator, and 3ds max. I do a lot of 3d and 2d animation, video editing and graphic design.
    This is the system i am currently planing on building:
    CPU: intel core i7 2600k ( I will be overclocking it to around 4.8 ghz)
    Motherboard: Asrock p67 extreme6
    Memory: G.Skill ripjaws x series 16gb ddr3 1600 cas latency 7
    Graphics Card: Gtx 570
    Power Supply: Rosewill bronze series 1000w
    Hard drive: 4x Corsair F120 in raid 0
    Case: Bitfenix collosus
    Cpu cooler: Noctua Nh-d14
    I have a budget of $2500 for this computer. I was wondering if anyone has any suggestions on things i should change or would recommend a completely different build for my budget.
    Also i was wondering if the gtx 570 was a stupid choice and i should get a quadro 2000 instead. I dont do any gaming.
    One last thing, do 4 ssd in raid 0 help at all or should i just get 8 hard drive in raid 10, or should i spend less money on hard drives.
    P.S. I know that the the i7 2600k has been recalled but i am in no hurry to build this computer. Also feel free to recommend hardware that hasn't yet been released but will probably be out in the next 8 months.
    P.S.S All of the programs i listed are CS5.

    Agree with all from Todd, and some things I'd consider:
    Dual CPUs will pack more rendering punch, especially in your 3D work.
    Even though 16GB of RAM is generous, I'd consider more.  Remember the rule:  2GB for each CPU core,  plus some more for OS and other applications.  If you're running 8 threads/cores for rendering, 24GB would be optimum.
    While the hard drives will provide awesome performance in that config, it's a lot of money to spend on less than a terabyte of storage.  RAID 0 is also pretty volatile, so be sure to run a reliable and regular backup system.
    For my money, I'd probably use one good-sized SSD for a system drive, then 3 or 4 conventional (or hybrid SSD) drives for media storage, with a decent RAID controller. You'll get 3 times the storage for half the price, and still have quite zippy I/O speeds.

  • Different Class for Different Release Group

    Dear All,
    I want to use different release class for a new group i am creating for Purchase Order Release.
    But it is not allowing me to save the same as the explanation given the overall release should not be there in one of the group created, but i am not able to find the overall release column while creating new release group.
    please help
    regards,
    Darshan

    Hi Darshan
    Can you please guide me ..
    I am facing the same problem assigning new class to new PO rel. Grp. and does not let me save...
    wht must have gone wrong...
    FYI: I am using sharing the charatersitics in both classes.
    Thanks
    Hiren

  • Need help:How to realize different prices for different quantity in CCM2.0?

    Hello,
    I'm in process of establishing catalog with CCM2.0 for our company. There is a user request to realize different prices for same item when user buying different quantity. Can you help me how I can realize this?
    Thanks a lot,
    Elly

    Hi,
    Is there somebody can help me? I really need this to be addressed ASAP...
    Thanks a lot!
    Elly

  • One MIRO document with two different vendors for two different line items

    Can it possible to make MIRO for a PO which is having two conditions(Basic price+Freight) with two different vendors.
    MIRO document needs:
    GR/IR Clearing    Dr.
    Freight Clearing  Dr.
    Vendor RM(X)         Cr.
    Vendor Freight(Y)   Cr.
    Is it possible to post the above document at a time not individually for each condition.

    Hi,
    Yes, It is possible to post Material and delivery cost in one document.where in material supplier is different than the Frieght vendor.
    Itm PK  BusA Acct no.   Description                    Tx     Amount in   USD   
    001 89       130001     Stock-Ingredients               244 0            880.00 
    002 96       320001     GR/IR Account - Ing.            244 0          1,200.00-
    003 86       520002     Ingredients - PPV               244 0          3,297.87 
    004 50       320008     GR/IR Account - Duty            244 0            797.87-
    005 50       320009     GR/IR Account - Fre.            244 0          2,180.00-
    Thanks
    Dinabandhu

  • JNDI returns a different class for different applications

    Hello,
    I have a WebSphere server that runs a JNDI service, in which I defined an entry for a ConnectionFactory declared on a remote server. On the server I run an EJB application which connects the JNDI and gets the ConnectionFactory. I also have a stand-alone Java application which gets the ConnectionFactory from the JNDI on the server.
    The problem is that the implementation class for the ConnectionFactory I get is different between the EJB and the stand-alone applications. The stand-alone application recieves a MQXAQueueConnectionFactory, which is just fine because I want to use XA transactions, but the EJB application receives a JMSQueueConnectionFactoryHandle!
    What can be the reason for that? How does the JNDI service determine which implementation class to return?
    (I suppose that is a specific behavior for Websphere...) How can I control that, if at all?
    Thanks!

    I have a similar situation occurring. Was therre any resolution found?

  • Help please with 2006 Macbook 13inch, for tv hook up.

    Help please with 2006 Macbook 13inch, to hook up to tv for streaming. The display works through VGA but the audio isn't working. Got a plug that goes into headphone jack on computer and connects into the audio jack on the back of tv but no sound. I'm not quite sure what the issue is, whether its the wrong plug, the tv, or the computer. Best Buy says this is the right plug and it seems that it would be, but who knows. If anyone has any experience in this, I would appreciate the help!

    Make sure those audio plugs are matched with the VGA plug. With your MacBook running something with audio switch between your sources on the TV Component, Composite and such. See if the sound is coming from another source. If so then you've got your audio plugs in the wrong jacks.
    Also could you post the make and model number of your TV.

  • In itunes a pop up keeps saying i am signed in with a different id for my podcasts

    when i go in to my itunes account i keep getting a pop up saying i am using a different id for my podcasts...and my update button in the bottom right hand corner is no longer there

    Try signing out of iTunes, then back in again. This worked for me and a few others. To sign out, in the iTunes menu bar, click "Store" > "Sign Out".

Maybe you are looking for

  • Not able to get the Repository Item for Configurable SKU

    I created a configurable sku and when i am trying to get the property of it I am getting an exception. I am using the following code: RepositoryItem repItem = productRepository.getItem("sku550018", "configurableSku"); ChangeAwareList ancestorCat = (C

  • ORA-01002: fetch out of sequence! HELP NEEDED!

    Hi, can someone help us (me)! Application: Sun-ConcordeXAL 2.6 Clients: Sun-Oracle-7.2.3 Database: Linux-Oracle-8.0.5.1 (PS! if clients software change to XAL 2.7 and Oracle 8.0.4 then we get same error) Maybe database configuration or client oracle

  • Text elements and selection screen

    I changed the selection screen using enhancement frame concept. But I can not change the selection text that displays on the selection screen. Does anybody know how to do it?

  • How to batch load data to several tables

    Hi, One customer have such data structure and have large number of data(arround 10 Million). I think it's proper to convert them to data that SQL loader can recognize and then insert into Oracle 8 or 9. The question is how to convert? Or maybe to ins

  • Authorizations & Business roles for ITSM

    Dears, i would like to ask whoever implemented an ITSM as a service desk for an IT organization, after setup the Organizational Structure (Organizational Model) and setup the Organizational Unit  (Sold To Part) and Org. Object (Support team). what is