Use a button in Javascript to change text?
-
I have made a javascript GUI in the program netbeans. It has a title, "Hello World" and a button. What I want to happen is, when you press the button, the text in the title changes to "Welcome to the wonderful world of programming" (This is for a school project) This is the code I am currently using for the button private void buttonActionPerformed(java.awt.event.Act... evt) { hello.setText("welcome to the wonderful world of programming"); } But when I run the program and press the button, nothing at all happens. FYI the heading variable is hello, and the program has matched them and is says everything in the code makes sense. Am I using the wrong command? If so, what do I use?
-
Answer:
Make sure your button variables are correctly set.
James at Yahoo! Answers Visit the source
Other answers
Make sure your button variables are correctly set.
Related Q & A:
- How do you pause a program until a button is pressed in JAVA?Best solution by Stack Overflow
- How can I use a button to retrieve a phone 'number' from contacts?Best solution by Stack Overflow
- How do I change text font & color default?Best solution by Yahoo! Answers
- How to Change Text in New My Yahoo?Best solution by Yahoo! Answers
- How do you change text color on facebook?Best solution by Quora
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.