How to place a value into a Label on another Jframe
I am trying to set a label to display a stringed message from another Jframe in the project. This string message has a variable concatenated into it of an integer value if that makes any difference. How do I do this? Your help is appreciated, thank you.
How to place a value into a label on another JFrame
I don't have any code for the label. Its almost like I described it in the original post.
I have a jframe with a calculate button when pushed calculates the number entered places that new number in a sentence and opens up a new JFrame window and shows that result in a jLabel and thats it.
My code for the calculate button works fine, and stores what needs to be stored into an integer and displays the sentence into a string.
I just need to show that string in a jlabel in a new window.
the name of the label is jLabel1
and the string name is resulta
How to place a value into a label on another JFrame
Can you create an object of one in another?
Ok, the only way I know how to do this, is to go to my results page and go for example
public class results extends sunday
sunday is where the string is located that I want to place in the results form jLabel1
I tried reading up but I am not finding anything that seems to help me.
I found a section setLabelfor(); section
i tried doing this in netbeans and found the section in properties but I keep getting an error saying that it cannot find symbol.
if their is some special kind of code that I am suppose to put in the setlabelfor() section in order to access the string from the sunday form I don't know what it is, and so far unsuccesful in finding the information for this problem
still no luck