Fred Wagner

Greenhorn
+ Follow
since Jan 07, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Fred Wagner

I can only repeat myself again: thank you so much Mr. Johnson.


I have found a strange issue to occur, on my brother's desktop (windows) my planets draw all at once, on my own box it paints step by step... is this intended?

is there a way to change it so that it is painted step by step instead of all at once?








Thanks again,



Fred
14 years ago
I changed my code as you showed, but now I get this error message:


14 years ago
Thank you again Mr. Johnson,


I have found the way to make the button print out "Hi" on pressing. However I still can't figure out how I can make it "erase" my old variable (f.e. m1) and use the one which the button is labelled with. (F.e. the button says m1 = 1500 and then the calculations are done with 1500 instead of the preset 6000)

Also is there a function that will just "clear" my current painting, so that it can be performed with the new variables instead of the default ones?

The current code looks like this:




Help is again greatly appreciated.


Thank you


chippa
14 years ago
Hi Mr. Johnson and thank you for your reply,



I have cheated my way around it by using the code of somebody else who had 2 buttons implemented already. My problem now is to figure out how can I make it so that my buttons (and future textareas) will change the value of the variables in the programme?



If you run this you will see 2 buttons and something painting. My intention is now that I can change the variables via a button (and later also a textarea). How do I do that?


Any help is greatly appreciated.


Thanks.


Chippa


PS: this is the link which leads to the thread in the other forum, for those who are interested : Link to the other Thread (other forum/website!)
14 years ago
Hi,

I am trying to find out how I can add buttons to my programme. It is a programme that calculates and paints coordinates. At the moment the variables are constants, but I would like in the end that one will be able to click on the button "m:15" and then the calculations are performed with m=15. Or even better with a textarea where personal numbers can be added.


This is my very first java programme and I have no clue about how to add the buttons. I have posed this question on the AWT/SWING subforum of the java-forums.org already - however nobody has answered yet (excuse the missing of a link to the thread, but the site seems to be offline right now).





Above you can see my attempt to create a seperate button class, and then give that out in the frame. It just won't work. (There are so many error messages that I won't post them, but if they are wished-for I will post them)

I really hope somebody will help me out. Thank you in advance.


chappa
14 years ago