开发者

How do I get my radio buttons to set data in a text field?

开发者 https://www.devze.com 2023-02-11 03:50 出处:网络
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?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消