I have a question for JButton object

JButton myButton = new JButton("a");
if (myButton.getText()=="a"){
myButton.setText("b");
When event take place Text's value will become "b" on the myButton, but try again myButton.getText() method get hold of value as has of is "a".
FtpFrame.java
import javax.swing.*;
import java.awt.*;
public class FtpFrame extends JFrame
JButton myButton = new JButton(" a ");
public static void main(String args[])
FtpFrame window = new FtpFrame("NextJoin Ftp For Java");
window.setVisible(true);
public FtpFrame(String title)
getContentPane().add(myButton,BorderLayout.NORTH);
myButton.addMouseListener(new FtpHandler(this,myButton.getText()));
public void settrantxt(String text)
myButton.setText(text);
FtpHandler.java
import javax.swing.*;
import java.awt.event.*;
class FtpHandler extends MouseAdapter
private FtpFrame ftpFrame;
private String msg = "";
public FtpHandler(FtpFrame ftpFrame,String msg)
this.ftpFrame = ftpFrame;
this.msg = msg;
public void mouseClicked(MouseEvent e)
if (1==1)
endif:{
if(msg == " a ")
ftpFrame.settrantxt(" b ");
break endif;
if(msg == " b ")
ftpFrame.settrantxt(" c ");
break endif;
if(msg == " c ")
ftpFrame.settrantxt(" a ");
break endif;
public void mousePressed(MouseEvent e)
public void mouseReleased(MouseEvent e)
public void mouseEntered(MouseEvent e)
public void mouseExited(MouseEvent e)
Thank you very much for your help!!!

I have change my code.
if (1==1)
endif:{
if(msg.equals(" a "))
ftpFrame.settrantxt(" b ");
break endif;
if(msg.equals(" b "))
ftpFrame.settrantxt(" c ");
break endif;
if(msg.equals(" c "))
ftpFrame.settrantxt(" a ");
break endif;
but question sa old of.
the text of button is being set to " b " but can't set to " c ".

Similar Messages

  • HT4792 So I have a question for this: I folowed this procedure, but when I'm trying to import the IOS from IMovies in my laptop I receive a message that states that the IMovie version installed doen't supports IOS files, although I have the last version i

    So I have a question for this: I folowed this procedure, but when I'm trying to import the IOS from IMovies in my laptop I receive a message that states that the IMovie version installed doen't supports IOS files, although I have the last version installed with all the updates... Any ideas, thoughts?
    Thanks

    I also have Jolly's problem. I found the iMovie 9.0.9 folder and tried to launch the older version of iMove. It would not launch. I removed all of the iMovie preferences from the Preferences folder, removed iMove 10 from the applications folder, and restarted my Mac. iMove 9.0.9 still won't launch and I can't access my videos created with the older version of iMovie. Is there a way to uninstall iMovie 10 and reinstall iMovie 9.0.9?
    I am running Yosemitie on a  iMac.
    Paul

  • I have a question for the Adobe customer service dept., not for the "community" as a whole!

    I have a question for the Adobe Customer Serice Dept., not the "community" as a whole. And I expect an answer! I want to know why I am expected to sign up for another service package when I just paid $25+ yesterday to be able to convert files back and forth from a PDF to a Word file and then back to a PDF. What kind of rip-off is this?

    Hi,
    I am very sorry that you had unpleasant experiences with our customer service.
    If you would like to export your PDF files to MS Word files then ExportPDF tool will do the job.
    If you would like to convert MS Word files to PDF then ConvertPDF tool will the the job.
    If you would like to export your PDF files to Word file then convert the Word files back to PDF then PDF Pack service is required which includes ExportPDF/Convert to PDF/Combine Files tools.
    Please let me know if you have any questions/issues.
    Thank you.
    Hisami

  • HI i am user for InDesincc TrialVersion now. i have serious question for all guys in here. at first i installed Indesigncc as korean language but now i need to indesigncc english language installation. and then now i cant translate and changing korean lan

    Daniel SterchiHI i am user for InDesincc TrialVersion now. i have serious question for all guys in here. at first i installed Indesigncc as korean language but now i need to indesigncc english language installation. and then now i cant translate and changing korean language interface to english language interface at indesigncc download. so i wonder How i can do that?...i am very seriuos for now....i want indesigncc version for Eng.Language interface. but now i cant do that .i dont konw how i can presented kor. interfacing transite to eng. interface..
    forumnotifierHI i am user for InDesincc TrialVersion now. i have serious question for all guys in here. at first i installed Indesigncc as korean language but now i need to indesigncc english language installation. and then now i cant translate and changing korean language interface to english language interface at indesigncc download. so i wonder How i can do that?...i am very seriuos for now....i want indesigncc version for Eng.Language interface. but now i cant do that .i dont konw how i can presented kor. interfacing transite to eng. interface..

    First of all, uninstall it with the uninstaller.
    Then:
    Install the ENGLISH version.
    Change the language in the CC app to Korean.
    Install the Korean version. (DON't uninstall the English version)
    Change back the langauge in the CC app to English.
    When your OS is running in English, InDesign will run in English with Korean functionality added, if your OS is running in Korean it will take the Korean User Interface, so let your OS run in English.
    Every installer language will add needed plugins for the work with that language. E.g. If I install Hebrew, I get RTL functionality in German version, only if I would change the OS language it would change the language of InDesign, InDesign takes always as UI language the language of the OS if available, if not (in your case you have uninstalled English before), it takes any version which is available in the order of languages specified in the OS.
    If you need to run your program in a different language than the OS but you have installed it in the language of the OS it becomes more difficult. You would have to use some system tools which are able to force a program to open with a different language. Most of those tools are freeware.

  • I have a question for iMac 27-inch  latest version

    Greetings to support Apple
    I have a question for iMac 27-inch  latest version
    I want to reach a PlayStation 4 on the iMac 27-inch screen
    What are the requirements needed to run the PlayStation 4 on the screen
    Please help

    This is a user to user forum, you are not contacting Apple directly. I would recommend you search to see all the questions others have posted regarding the same or similar question.
    Good luck.

  • I have a question for apple I bought a 15$ iTunes card and got to movie rentals it's been 3 days and the movie bearlly downloaded onced it finished it restarted it self I want my money back....what do I do

    I have a question for apple I bought a 15$ iTunes card and got to movie rentals it's been 3 days and the movie bearlly downloaded onced it finished it restarted it self I want my money back....what do I do

    You will have to contact Apple/iTunes support, we are just other users like you, not Apple employees.
    http://www.apple.com/support/itunes/contact/
    You can also Report a Problem with the rental in iTunes on your computer.
    http://appletoolbox.com/2012/03/how-to-report-a-problem-for-an-iphoneipadipod-to uch-app/

  • Hello, I have a question for you. receipt of some Internet providers or notices notifications on the lock screen and I consume the battery on my iPhone 4S. would you please tell me how do I block these ads in blue letters on the screen me? thanks

    hello, I have a question for you. receipt of some Internet providers or notices notifications on the lock screen and I consume the battery on my iPhone 4S. would you please tell me how do I block these ads in blue letters on the screen me? thanks

    Hi demir67,
    Welcome to the Support Communities!
    The articles below will show you how to block text messages from your iPhone:
    iPhone User Guide for iOS 7:
    Send and receive messages - iPhone
    http://help.apple.com/iphone/7/#/iph01ac18d71
    Block unwanted messages. On a contact card, tap Block this Caller. You can see someone’s contact card while viewing a message by tapping Contact, then tap the "i" with the cirle.   You can also block callers in Settings > Phone > Blocked. You will not receive voice calls, FaceTime calls, or text messages from blocked callers.
    iOS 7: Understanding call and message blocking
    http://support.apple.com/kb/HT5845
    Notification Center - iPhone
    http://help.apple.com/iphone/7/#/iph6534c01bc
    Set notification options. Go to Settings > Notification Center. Tap an app to set its notification options. You can also tap Edit to arrange the order of app notifications.
    Cheers,
    Judy

  • I have a question for people who use cocoppa?

    If you use cocoppa I have a question. I see that there are icons on the app for camera,photos, music & messages on cocoppa. Like the actually iPods apps that you didn't download & were on there when you got it. But when you get to the part where it wants to know what app you want to use it for & you search one of those 4 I can't find it. Can you just not get the icons for the iPods default apps or am I doing something wrong? If you've used the app & figured it out let me know how please

    Like how do you get the cute app short cuts the the iPods default apps?

  • I have a question for people who have ordered personalized iPods online and picked them up at a Retail Store

    Is it possible to be credited in-store for recycling an old iPod even if you were already charged in full for the new device at the time of purchase?
    The difference between "yes" and "no" is about $30 and if it's "no" then I'll definitely forego the engraving, as much as I'd like to have it done for my intended 5G purchase (that is, assuming that Apple ever gives us an actual retail date).

    Firstly, the CS3 Design Prem comes with Photoshop Extended CS3, Illustrator CS3, InDesign CS3, Dreamweaver CS3, Acrobat Pro 8 as well as Bridge and and Vesion Cue.
    Secondly, has the packaging been opened? If so, it could still be installed on a PC or rather Macintosh somewhere. If so, this makes it a trickier proposition with regards to installing it yourself or selling it on.
    Don't quote me on this, but if the software is fresh and unopened or has been deactivated, you could upgrade to Design Prem CS4 Mac and then crossgrade to Design Prem Windows. Don't know if it's possible to crossgrade and upgrade in one fell swoop from Mac to Win. I suspect not - but will be happy to be proven wrong.
    Hope this helps.
    Ian

  • I have a question for my bill

    I have charged 70$ for VIDEO FAILED in my bill,but I ask for technicion because one plug in my apartment doesn't work.My cable TV is included in my rent.Tne plugs are Comcast responsibility .Why should I to pay for the plug repair?I called Comcast and they remove half of my charge for technicion visit.But i think i should not to pay for this. Can someone help me?

    call customer care @ 800.922.0204 - they will have access to your account info.
    You may wait a while (hrs or days) for a response from a Vzn rep on here.

  • How can I have one row for each object?

    Post Author: farnaz
    CA Forum: WebIntelligence Reporting
    I have 3 objcts that one of them is ID and second one is internal code and the third one is quantity.There is more than one value for each ID (becouse of internal code).I want to create a report based on ID and quantity (not based on internal code).I make a break on ID but the result shows me more than one row for each ID.so how can i have just one row for each ID?
    another question:
    how can I post screen shot of the results to my messag in forum?

    Post Author: jsanzone
    CA Forum: WebIntelligence Reporting
    farnaz:
    Have you tried to omit "internal code" from your grid?  In normal circumstances, if you have "ID" and "Quantity" on the grid, then WebI will on its own summarize Quantity based on ID, however, this is provided that Quantity has been set up as a measure (or metric).  The quickest way to tell if Quantity is a metric or not is to observe the color of its icon when you look at it in the data panel.  If it is a purple (or sometimes appears as pink or fuscia) dot, then it's a measure, but if it is a blue box then it is a dimension.  If you need Quantity as a measure then this will have to be modified at the universe (make it look like "sum(Quantity)" in the select phase of the object, and insure the object is defined as a number....

  • Do you have any question for us?

    At the end of interview most employer as this, what could be question to ask to for good impression on Oracle DBA interview?

    A couple of questions come to mind.
    1) How did this position become available?
    2) What major challanges are you facing or new projects you have coming up with which you hope I can help.
    3) Where do database administrators fit in your organization structure -- some organizaions put them in infrastructure support, some in application development, some in operations. You also want to know how many levels down from the CIO is the DBA -- this will help you guage your ability to be visible to higher levels of management; the closer you are to the CIO the more visible you will be.
    4) How the change controll process works -- you want a fairly formal and tight process so that only approved chages are implemented. Otherwise your life can be full of grief. Also helps you understand your roll in the process.
    5) Does the DBA provide internal consulting services such as data model review, applicaion and query tuning, process model review and advice,,,,
    There are others too, but you want to understand as best you can your future working environment and the expectations the company will have of you.

  • Have a question for everyone

    I am going nuts with this "cannot read from or write to" problem so many of us are having. My question is, exactly how many of us are there here having the same problems. Since we are consumers, and we have purchesed a product and are recieving absolutly NO help, there may have to be some "legaly" agressive action.
    What do you all think?
    I bought these two iPods because they were "Supposed" to be the best. My buddies Mp3 player from Wal-Mart is kicking mines *$$...
    Jeff

    I guess I need to clarify myself. In no way am I saying we should get together and sue Apple. I am saying that in all the discussions I have had with SOME of Apples reps, being told I am the "First case they have heard of" and still not getting anywhere was REALLY starting to get me upset. Until yesterday, I got ZERO help. Yesterday I spoke with a very nice rep from Apple who directed me to the following site( depot.info.apple.com )
    Marc, not shure what "Flooding" is and for the record, I am NO Wal-Mart fan. I am only here looking for help and answers for everyone who is having a very difficult time.
    I would like to be able to get these going again. Problem free.
    I will try all suggestions..
    Thanks all,
    Jeff
    PS HappinessIsWinning, Go to the link that I mentioned above, put depot.info.apple.com in the address bar and hit enter. Follow the directions and go from there. Give Apple a chance to resolve your problem. ( I'm as upset as you my friend.)

  • Hey guys I have a question for you all.

    I set my security question a couple of years ago and now can't remember the answers and the email I set up to retrieve the answers I also can not remember the password to. So if you guys have any easy solutions... I can get on my account and buy things easily on my ipod, but when I try on my mac I have to answer the security questions. Help please!

    The Three Best Alternatives for Security Questions and Rescue Mail
        1. Use Apple's Express Lane.
              Go to https://expresslane.apple.com ; click 'See all products and services' at the
              bottom of the page. In the next page click 'More Products and Services, then
              'Apple ID'. In the next page select 'Other Apple ID Topics' then 'Forgotten Apple
              ID security questions' and click 'Continue'. Please be patient waiting for the return
              phone call. It will come in time depending on how heavily the servers are being hit.
         2.  Call Apple Support in your country: Customer Service: Contacting Apple for support or
              Apple ID- Contacting Apple for help with Apple ID account security. Ask to speak to
              Account Security.
         3.  Rescue email address and how to reset Apple ID security questions.
    How to Manage your Apple ID: Manage My Apple ID

  • TS3510 Multiple devices on same email account, have a question for forum??

    Hello, my son who lives with my ex-wife has an itouch with facetime and imessage. His itouch is set up under my ex-wife's email account. I am aware and have been, that whenever he and I use imessage she receives all the messages on her iphone as well. My question is, can she view facetime conversations as well between my son and I on her iphone?
    Thanks! 

    Not unless she is looking over his shoulder.  Facetime call will be answered on one device and the other device cannot join in as far as I know

Maybe you are looking for