With the two listeners on the button and I added printlns to each Listener. It does print out.
Foolish of myself, the default size output without a Radio Button being pressed is 12, and the font...
Type: Posts; User: aStudentofJava
With the two listeners on the button and I added printlns to each Listener. It does print out.
Foolish of myself, the default size output without a Radio Button being pressed is 12, and the font...
I was just testing to see if it would make a difference.
Is there a way for my 'above post' possible?
"But I'm wondering how am I going to make it when I mouseClick, it will use the...
I found the issue on why it would not instantiate.
public class Lab3 extends JFrame {
/**
* Creates new form Lab3
*/
public Lab3() {
initComponents();
public class ButtonActions implements MouseListener, ActionListener {
public void actionPerformed(ActionEvent event) {
if (event.getSource() == btnSmall) {
...
How would I do that separately?
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at prog24178.Lab3.<init>(Lab3.java:24)
at prog24178.Lab3$1.run(Lab3.java:382)
at...
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.Font;
public class Lab3 extends JFrame {
/**
* Creates new form Lab3
*/
These are the list of variables that I am using:
private javax.swing.JCheckBox btnBold;
private javax.swing.JRadioButton btnCentre;
private javax.swing.JCheckBox btnItalic;
...
I tried this:
public class ButtonActions implements MouseListener, ActionListener {
public void mouseClicked(MouseEvent event) {
String usrInput =...
The last posted code was just a pseudo I came up with.
I tried doing what I typed in there but I get an error when I tried to event.getSource()==btnSmall.
It says it cannot recognize it.
Hi;
I have this code:
public class Lab3 extends JFrame {
/**
* Creates new form Lab3
*/