JLabel(String text), i figured out this code is needed to set text of label. Now what should i do to proceed.
Type: Posts; User: Supreme233
JLabel(String text), i figured out this code is needed to set text of label. Now what should i do to proceed.
Yes the Listener is called when the data button is pressed.
I want to show it in label named "data".
I dont know what method to call to set the text of a label (New to Java sorry).
I just cant seem to figure out how to get data button to work. i want that button to take user doubles and show it in label, that i named as data(same name as the button name).
This code works when i run the driver class. However, i already have the driver class and need help in this panel.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class DisplayFinal_Panel extends JPanel
{
private JLabel label1, label2, label3;
private JTextField box;
...
I am new to this and i really need help. How do u wrap ur code with tags
--- Update ---
Also, This is my panel so all the code goes here. The only other thing i have is a driver, but i need no...
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class DisplayFinal_Panel extends JPanel
{
private JLabel label1, label2, label3;
private JTextField box;
...