Can't get these radio buttons to work. I'd like them to 开发者_运维问答set two text fields upon choosing one button. What am I missing?
Also, why isn't my code posting to this forum correctly?
//import all needed functionality
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.*;
Read the section from the Swing tutorial on How to Use Radio Buttons. I don't see where you are adding an ActionListener to the buttons.
精彩评论