我的单选按钮出现问题.我可以同时点击这三个.它应该是当你点击一个时另一个关闭?
我正在使用网格布局.所以当我尝试group.add它不起作用.
例:
我有这样的按钮
JRadioButton seven = new JRadioButton("7 years at 5.35%", false);
JRadioButton fifteen = new JRadioButton("15 years at 5.5%", false);
JRadioButton thirty = new JRadioButton("30 years at 5.75%", false);
ButtonGroup group = new ButtonGroup();
grid.add(seven);
grid.add(fifteen);
grid.add(thirty);
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
/*Change Request #6
Write the program in Java (with a graphical user interface)
so that it will allow the user to select which way
they want to calculate a mortgage:
by input of the amount of the mortgage,
the term …Run Code Online (Sandbox Code Playgroud) 我是学生这是家庭作业......桌子在那里,但没有插入数据.
谢谢你的建议
Msg 156, Level 15, State 1, Line 181
Incorrect syntax near the keyword 'INSERT'.
USE Mort;
Go
INSERT INTO
Employee
(Last_name,
First_name,
Address,
City,
State,
Telephone_area_code,
Telephone_number,
Job_title,
Hire_date,
Wage,
Gender,
Race,
Age)
VALUES
('McNamara',
'Juanita',
'923 Parkway',
'La Jolla',
'CA',
'619',
'555-0208',
'Accounting Clerk',
'10/07/2003',
'$12.75',
'F',
'Hispanic',
32);
INSERT INTO
Employee
(Last_name,
First_name,
Address,
City,
State,
Telephone_area_code,
Telephone_number,
Job_title,
Hire_date,
Wage,
Gender,
Race,
Age)
VALUES
('Stephens',
'Harvey',
'7863 High Bluff Drive',
'La Jolla',
'CA',
'619',
'555-0123', …Run Code Online (Sandbox Code Playgroud)