- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 CS12 类(class)中有一项作业,即创建一个可以将 JRadioButon/JCheckBox/JComboBox
组合在一起的程序。
到目前为止,我对 JComboBox
非常困惑,我不明白我在 ActionListener
部分中到底缺少什么。
首先,我无法从第三列(颜色和内部)中选择任何选项,它只是没有显示在同一列中创建的标签上。
其次,在我从第四列选择省份之前,我看不到第二列中创建的 JCheckBoxes
的值。
会接受任何建议,谢谢。//请原谅我的英语,我不是母语人士。
导入 javax.swing.*;
import java.awt.Color;
import java.awt.Font;
import java.awt.event.*;
public class VolvoStore extends JFrame implements ItemListener {
private JButton btnCheckout;
private JButton btnClear;
private JButton btnExit;
private JButton btnAbout;
private JLabel txt1 = new JLabel();// total
private JLabel txt2 = new JLabel();
private JLabel txt3 = new JLabel();
private JLabel txt4 = new JLabel();
private JLabel txt5 = new JLabel();
private JLabel txt6 = new JLabel();
private JLabel txt7 = new JLabel();
private JLabel txt8 = new JLabel();
Double m;
Double k;
JCheckBox chk = new JCheckBox("Climate Package [Add $1,350.00]");
JCheckBox chk1 = new JCheckBox("Technology Package [Add $1,500.00]");
JCheckBox chk2 = new JCheckBox("Inscription Package [Add $2,600.00]");
JCheckBox chk3 = new JCheckBox(
"19\" BOR Diamond Cut Alloy Wheels [Add $1,250.00]");
JCheckBox chk4 = new JCheckBox(
"Blind Spot Information System [Add $800.00]");
JCheckBox chk5 = new JCheckBox(
"Active Dual Xenon Headlights with Washers [Add $1,000.00]");
JCheckBox chk6 = new JCheckBox("Front and Rear Park Assist [Add $600.00]");
JCheckBox chk7 = new JCheckBox(
"Apple CarPlay System + Bose Sound System [Add $2400.00]");
private JRadioButton rb1, rb2, rb3, rb4;
private JLabel label = new JLabel();
private JLabel label1 = new JLabel();
private JLabel label2 = new JLabel();
private JLabel label3 = new JLabel();
private JLabel label4 = new JLabel();
private JLabel label5 = new JLabel();
private JLabel label6 = new JLabel();
private JLabel label7 = new JLabel();
private JLabel label11 = new JLabel();
private JLabel label12 = new JLabel();
private JLabel label13 = new JLabel();
private JLabel label14 = new JLabel();
private JLabel label15 = new JLabel();
private JLabel label16 = new JLabel();
private JLabel label17 = new JLabel();
private JLabel label18 = new JLabel();
private JLabel label19 = new JLabel();
private JLabel label20 = new JLabel();
private JLabel label21 = new JLabel();
private JLabel label111 = new JLabel();
private JLabel label112 = new JLabel();
private JLabel label113 = new JLabel();
private JLabel label114 = new JLabel();
private JLabel tx = new JLabel();
private JLabel tx2 = new JLabel();
private JLabel tx3 = new JLabel();
private JLabel tx4 = new JLabel();
private JLabel tx4a = new JLabel();
private JLabel tx5 = new JLabel();
private JLabel tx6 = new JLabel();
private JLabel tx7 = new JLabel();
private JLabel tx71 = new JLabel();
private JLabel tx72 = new JLabel();
private JLabel tx73 = new JLabel();
double total;
double total1;
JComboBox<String> cboAColor;
JComboBox<String> cboBColor;
JComboBox<String> cboCColor;
JComboBox<String> cboProvinces;
int a = 0;
int b = 0;
int c = 0;
int d = 0;
int d1 = 0;
int f = 0;
int g = 0;
int h = 0;
JPanel panel = new JPanel();
private JTextField text1 = new JTextField("", 16);// total bill
public static void main(String[] args) {
new VolvoStore();
}
public VolvoStore() {
// OK Button
btnCheckout = new JButton("Checkout");
btnCheckout.setToolTipText("Checkout");
btnCheckout.setBounds(1315, 150, 120, 40);
btnCheckout.setMnemonic(KeyEvent.VK_C);
panel.setLayout(null);
btnCheckout.setBorderPainted(false);
panel.add(btnCheckout);
// Clear
btnClear = new JButton("Clear");
btnClear.setToolTipText("Clear");
btnClear.setBounds(1315, 200, 120, 40);
btnClear.setMnemonic(KeyEvent.VK_C);
btnClear.setBorderPainted(false);
panel.add(btnClear);
// EXIT
btnExit = new JButton("Exit");
btnExit.setToolTipText("Exit");
btnExit.setBounds(1315, 250, 120, 40);
btnExit.setMnemonic(KeyEvent.VK_C);
panel.setLayout(null);
btnExit.setBorderPainted(false);
panel.add(btnExit);
// ABOUT
btnAbout = new JButton("About");
btnAbout.setToolTipText("About");
btnAbout.setBounds(1315, 300, 120, 40);
btnAbout.setMnemonic(KeyEvent.VK_C);
panel.setLayout(null);
btnAbout.setBorderPainted(false);
panel.add(btnAbout);
//user input
panel.add(text1);
text1.setBounds(1275, 775, 200, 35);
text1.setHorizontalAlignment(JLabel.CENTER);
//total MSRP
txt1.setText("0.0");
txt1.setBounds(1300, 575, 140, 40);
panel.add(txt1);
txt1.setHorizontalAlignment(JLabel.CENTER);
// 1st column
txt2.setText("0.0");
txt2.setBounds(155, 875, 140, 40);
panel.add(txt2);
txt2.setHorizontalAlignment(JLabel.CENTER);
//Second Column
txt3.setText("0.0");
txt3.setBounds(575, 875, 140, 40);
panel.add(txt3);
txt3.setHorizontalAlignment(JLabel.CENTER);
// total Selling Price
txt4.setText("0.0");
txt4.setBounds(1300, 875, 140, 40);
panel.add(txt4);
txt4.setHorizontalAlignment(JLabel.CENTER);
//Freight & Dealer Prep
txt5.setText("10.0");
txt5.setBounds(1300, 675, 140, 40);
panel.add(txt5);
txt5.setHorizontalAlignment(JLabel.CENTER);
//third column
txt6.setText("0.0");
txt6.setBounds(965, 875, 140, 40);
panel.add(txt6);
txt6.setHorizontalAlignment(JLabel.CENTER);
//check buttons in a second column + radio button and images from the first column
panel.add(chk);
panel.add(chk1);
panel.add(chk2);
panel.add(chk3);
panel.add(chk4);
panel.add(chk5);
panel.add(chk6);
panel.add(chk7);
chk.setBounds(450, 50, 540, 40);
chk1.setBounds(450, 150, 540, 40);
chk2.setBounds(450, 250, 540, 40);
chk3.setBounds(450, 350, 540, 40);
chk4.setBounds(450, 450, 540, 40);
chk5.setBounds(450, 550, 540, 40);
chk6.setBounds(450, 650, 540, 40);
chk7.setBounds(450, 750, 540, 40);
panel.setLayout(null);
btnCheckout.addActionListener(new ButtonListener());
btnClear.addActionListener(new ButtonListener());
btnAbout.addActionListener(new ButtonListener());
btnExit.addActionListener(new ButtonListener());
chk.addItemListener(this);
chk1.addItemListener(this);
chk2.addItemListener(this);
chk3.addItemListener(this);
chk4.addItemListener(this);
chk5.addItemListener(this);
chk6.addItemListener(this);
chk7.addItemListener(this);
// images
ImageIcon imgThisImg = new ImageIcon("S80.png");
label1.setIcon(imgThisImg);
label1.setBounds(25, 450, 550, 590);
panel.add(label1);
label1.setOpaque(false);
ImageIcon imgThisImg1 = new ImageIcon("XC90.png");
label2.setIcon(imgThisImg1);
label2.setBounds(25, -50, 680, 390);
panel.add(label2);
label2.setOpaque(false);
ImageIcon imgThisImg2 = new ImageIcon("XC70.png");
label3.setIcon(imgThisImg2);
label3.setBounds(25, 150, 680, 390);
panel.add(label3);
label3.setOpaque(false);
ImageIcon imgThisImg3 = new ImageIcon("XC60.png");
label4.setIcon(imgThisImg3);
label4.setBounds(25, 350, 680, 390);
panel.add(label4);
label4.setOpaque(false);
ImageIcon imgThisImg4 = new ImageIcon("Volvo.jpeg");
label5.setIcon(imgThisImg4);
label5.setBounds(-10, -170, 680, 390);
panel.add(label5);
label5.setOpaque(false);
ImageIcon imgThisImg5 = new ImageIcon("012.png");
label6.setIcon(imgThisImg5);
label6.setBounds(1275, 290, 680, 390);
panel.add(label6);
label6.setOpaque(false);
ImageIcon imgThisImg6 = new ImageIcon("sun.png");
label7.setIcon(imgThisImg6);
label7.setBounds(1275, 220, 680, 390);
panel.add(label7);
label7.setOpaque(false);
// Create radio buttons
rb1 = new JRadioButton("Volvo XC90");
rb2 = new JRadioButton("Volvo XC70");
rb3 = new JRadioButton("Volvo XC60");
rb4 = new JRadioButton("Vovlo S80");
// Create button group for soup options
ButtonGroup group = new ButtonGroup();
group.add(rb1);
group.add(rb2);
group.add(rb3);
group.add(rb4);
// Create soup panel
rb1.setBounds(0, 200, 120, 40);
rb2.setBounds(0, 400, 120, 40);
rb3.setBounds(0, 600, 120, 40);
rb4.setBounds(0, 800, 120, 40);
//panel.add(label);
//label.setBounds(200, -150, 550, 590);
rb1.addItemListener(this);
rb2.addItemListener(this);
rb3.addItemListener(this);
rb4.addItemListener(this);
// text at the top and side
Font a = new Font("Greek", Font.PLAIN, 20);
tx.setText("Step 1: Model");
tx.setBounds(125, 0, 300, 40);
panel.add(tx);
tx2.setText("Step 2: Packages & Options ");
tx2.setBounds(520, 0, 300, 40);
panel.add(tx2);
tx3.setText("Step 3: Paint & Interior");
tx3.setBounds(925, 0, 300, 40);
panel.add(tx3);
tx4.setText("Step 4: Final Payment");
tx4.setBounds(1275, 0, 300, 40);
panel.add(tx4);
tx4a.setText("Total MSRP");
tx4a.setBounds(1275, 525, 300, 40);
panel.add(tx4a);
tx5.setText("Freight & Dealer Preparation");
tx5.setBounds(1275, 625, 300, 40);
panel.add(tx5);
tx6.setText("Trade-in and Down Payment ");
tx6.setBounds(1275, 725, 300, 40);
panel.add(tx6);
tx7.setText("Total Selling Price");
tx7.setBounds(1275, 825, 300, 40);
panel.add(tx7);
tx71.setText("Select Upholstery");
tx71.setBounds(985, 350, 300, 40);
panel.add(tx71);
tx72.setText("Select Trim");
tx72.setBounds(1000, 550, 300, 40);
panel.add(tx72);
tx73.setText("Select Color");
tx73.setBounds(1000, 150, 300, 40);
panel.add(tx73);
tx.setFont(a);
tx2.setFont(a);
tx3.setFont(a);
tx4.setFont(a);
//
// Create main panel
panel.setLayout(null);
panel.add(rb1);
panel.add(rb2);
panel.add(rb3);
panel.add(rb4);
//Jcombobox at third and fourth columns
String[] aa = { "Black Sapphire" ,"Electric Silver", "Passion Red [add $200.00]",
"Crystal White Pearl [add $200.00]" };
cboAColor = new JComboBox<String>(aa);
panel.add(cboAColor);
cboAColor.setBounds(940, 100, 200, 200);
String[] bb = { "Black/Black ARTICO Leather, without additional charge",
"Alpaca Grey/Alpaca Grey ARTICO Leather, without additional charge",
"Almond Beige/Cashmere Beige ARTICO Leather [add $350.00]" };
cboBColor = new JComboBox<String>(bb);
panel.add(cboBColor);
cboBColor.setBounds(940, 300, 200, 200);
String[] cc = { "Burl Walnut Wood, without additional charge", "Dark Ash Wood, without additional charge", "Aluminum[add $200]" };
cboCColor = new JComboBox<String>(cc);
panel.add(cboCColor);
cboCColor.setBounds(940, 500, 200, 200);
String[] dd = { "Select Province", "Ontario", "Quebeck", "Nova Scotia",
"New Brunswick", "Manitoba", "British Colombia",
"Prince Edward Island", "Saskatchewan", "Alberta",
"Newfoundland and Labrador" };
cboProvinces = new JComboBox<String>(dd);
panel.add(cboProvinces);
cboProvinces.setBounds(1275, 000, 200, 200);
cboAColor.addItemListener(this);
cboBColor.addItemListener(this);
cboCColor.addItemListener(this);
cboProvinces.addItemListener(this);
// borders ...
panel.add(label11);
label11.setBackground(Color.white);// set background color
label11.setBorder(BorderFactory.createLineBorder(Color.black));// set //
// color
label11.setBounds(125, 875, 200, 35);// bounds and location
label11.setOpaque(false);
// create black border for a Clear Button
panel.add(label12);
label12.setOpaque(false);
label12.setBackground(Color.white);// set background color
label12.setBorder(BorderFactory.createLineBorder(Color.black));// set //
// color
label12.setBounds(550, 875, 200, 35);// bounds and location
// create black border for a Clear Button
panel.add(label13);
label13.setOpaque(false);
label13.setBackground(Color.white);// set background color
label13.setBorder(BorderFactory.createLineBorder(Color.black));// set
// color
label13.setBounds(940, 875, 200, 35);// bounds and location
panel.add(label14);
label14.setOpaque(false);
label14.setBackground(Color.white);// set background color
label14.setBorder(BorderFactory.createLineBorder(Color.black));// set //
// color
label14.setBounds(1275, 875, 200, 35);// bounds and location
panel.add(label15);
label15.setOpaque(false);
label15.setBackground(Color.white);// set background color
label15.setBorder(BorderFactory.createLineBorder(Color.black));// set //
// color
label15.setBounds(1275, 775, 200, 35);// bounds and location
panel.add(label16);
label16.setOpaque(false);
label16.setBackground(Color.white);// set background color
label16.setBorder(BorderFactory.createLineBorder(Color.black));// set //
// color
label16.setBounds(1275, 675, 200, 35);// bounds and location
panel.add(label17);
label17.setOpaque(false);
label17.setBackground(Color.white);// set background color
label17.setBorder(BorderFactory.createLineBorder(Color.black));// set //
// color
label17.setBounds(1275, 575, 200, 35);// bounds and location
panel.add(label18);
label18.setOpaque(false);
label18.setBackground(Color.white);// set background color
label18.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY));// set
// //
// color
label18.setBounds(0, -100, 445, 1100);// bounds and location
panel.add(label19);
label19.setOpaque(false);
label19.setBackground(Color.white);// set background color
label19.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY));// set
// //
// color
label19.setBounds(445, -100, 415, 1100);// bounds and location
panel.add(label20);
label20.setOpaque(false);
label20.setBackground(Color.white);// set background color
label20.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY));// set
// //
// color
label20.setBounds(860, -100, 360, 1100);// bounds and location
panel.add(label21);
label21.setOpaque(false);
label21.setBackground(Color.white);// set background color
label21.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY));// set
// //
// color
label21.setBounds(1220, -100, 360, 1100);// bounds and location
panel.add(label111);
label111.setBackground(Color.white);// set background color
label111.setBorder(BorderFactory.createLineBorder(Color.black));// set
// //
// color
label111.setBounds(1275, 150, 200, 35);// bounds and location
label111.setOpaque(false);
panel.add(label112);
label112.setBackground(Color.white);// set background color
label112.setBorder(BorderFactory.createLineBorder(Color.black));// set
// //
// color
label112.setBounds(1275, 200, 200, 35);// bounds and location
label112.setOpaque(false);
panel.add(label113);
label113.setBackground(Color.white);// set background color
label113.setBorder(BorderFactory.createLineBorder(Color.black));// set
// //
// color
label113.setBounds(1275, 250, 200, 35);// bounds and location
label113.setOpaque(false);
panel.add(label114);
label114.setBackground(Color.white);// set background color
label114.setBorder(BorderFactory.createLineBorder(Color.black));// set
// //
// color
label114.setBounds(1275, 300, 200, 35);// bounds and location
label114.setOpaque(false);
//
// frame
setContentPane(panel);
setSize(1520, 950);
setTitle("Volvo Store");
getContentPane().setBackground(new Color(255, 255, 255));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
setResizable(false);
validate();
}
private class ButtonListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
if (e.getSource() == btnCheckout) {
} else if (e.getSource() == btnClear) {
txt1.setText("0.0");
txt2.setText("0.0");
txt3.setText("0.0");
txt4.setText("0.0");
txt5.setText("0.0");
txt6.setText("0.0");
txt7.setText("0.0");
chk7.setSelected(false);
chk6.setSelected(false);
chk5.setSelected(false);
chk4.setSelected(false);
chk3.setSelected(false);
chk2.setSelected(false);
chk1.setSelected(false);
chk.setSelected(false);
} else if (e.getSource() == btnAbout) {
JOptionPane.showMessageDialog(null,
"Made by Evgeny Shumilov - 2014", "About",
JOptionPane.INFORMATION_MESSAGE);
} else if (e.getSource() == btnExit) {
}
}
}
public void itemStateChanged(ItemEvent e) {
double a = 0;
double b = 0;
double c = 0;
double d = 0;
double d1 = 0;
double f = 0;
double g = 0;
double h = 0;
double a1 = 0;
double a2 = 0;
double a3 = 0;
double a4 = 0;
double b1 = 0;
double b2 = 0;
double b3 = 0;
double c1 = 0;
double c2 = 0;
double c3 = 0;
//radiobutton
if (e.getSource() == rb1) {
txt1.setText("50800.0");
txt2.setText("50800.0");
panel.add(txt1);
panel.add(txt2);
m = Double.parseDouble(txt1.getText());
txt1.setHorizontalAlignment(JLabel.CENTER);
}
else if (rb2.isSelected()) {
txt1.setText("42100.0");
txt2.setText("42100.0");
panel.add(txt1);
panel.add(txt2);
m = Double.parseDouble(txt1.getText());
txt1.setHorizontalAlignment(JLabel.CENTER);
} else if (rb3.isSelected()) {
txt1.setText("40950.0");
txt2.setText("40950.0");
panel.add(txt1);
panel.add(txt2);
m = Double.parseDouble(txt1.getText());
txt1.setHorizontalAlignment(JLabel.CENTER);
} else if (rb4.isSelected()) {
txt1.setText("49000.0");
txt2.setText("49000.0");
panel.add(txt1);
panel.add(txt2);
m = Double.parseDouble(txt1.getText());
txt1.setHorizontalAlignment(JLabel.CENTER);
}
if (chk.isSelected()) {
a = 1350;
}
if (chk1.isSelected()) {
b = 1500;
}
if (chk2.isSelected()) {
c = 2600;
}
if (chk3.isSelected()) {
d = 1250;
}
if (chk4.isSelected()) {
d1 = 800;
}
if (chk5.isSelected()) {
f = 1000;
}
if (chk6.isSelected()) {
g = 600;
}
if (chk7.isSelected()) {
h = 2400;
}
//p
if (e.getSource() == cboProvinces) {
String one = (String) cboProvinces.getSelectedItem();
if (one.equals("Select Province")) {
txt5.setText("0.0");
panel.add(txt5);
} else if (one.equals("Ontario")) {
txt5.setText("1934.0");
panel.add(txt5);
k = Double.parseDouble(txt5.getText());
} else if (one.equals("Quebeck")) {
txt5.setText("2200.0");
panel.add(txt5);
k = Double.parseDouble(txt5.getText());
} else if (one.equals("Nova Scotia")) {
txt5.setText("1800.0");
panel.add(txt5);
k = Double.parseDouble(txt5.getText());
} else if (one.equals("New Brunswick")) {
txt5.setText("1999.0");
panel.add(txt5);
k = Double.parseDouble(txt5.getText());
} else if (one.equals("Manitoba")) {
txt5.setText("2100.0");
panel.add(txt5);
k = Double.parseDouble(txt5.getText());
} else if (one.equals("British Colombia")) {
txt5.setText("1300.0");
panel.add(txt5);
k = Double.parseDouble(txt5.getText());
} else if (one.equals("Prince Edward Island")) {
txt5.setText("2335.0");
panel.add(txt5);
k = Double.parseDouble(txt5.getText());
} else if (one.equals("Saskatchewan")) {
txt5.setText("2120.0");
panel.add(txt5);
k = Double.parseDouble(txt5.getText());
} else if (one.equals("Alberta")) {
txt5.setText("1670.0");
panel.add(txt5);
k = Double.parseDouble(txt5.getText());
} else if (one.equals("Newfoundland and Labrador")) {
txt5.setText("3200.0");
panel.add(txt5);
k = Double.parseDouble(txt5.getText());
}
}
//color
if (e.getSource() == cboAColor) {
String one = (String) cboAColor.getSelectedItem();
if (one.equals("Passion Red")) {
a1 = 200;
txt6.setText("200.0");
panel.add(txt6);
} else if (one.equals("Black Sapphire")) {
a2 = 0;
txt6.setText("0.0");
panel.add(txt6);
} else if (one.equals("Crystal White Pearl")) {
a3 = 200.0;
txt6.setText("200.0");
panel.add(txt6);
} else if (one.equals("Electric Silver")) {
a4 = 0;
txt6.setText("0.0");
panel.add(txt6);
}
}
//leather
if (e.getSource() == cboBColor) {
String two = (String) cboBColor.getSelectedItem();
if (two.equals("Black/Black ARTICO Leather")) {
b1 = 0;
txt6.setText("0.0");
panel.add(txt6);
} else if (two.equals("Alpaca Grey/Alpaca Grey ARTICO Leather")) {
b2 = 0;
txt6.setText("0.0");
panel.add(txt6);
} else if (two.equals("Almond Beige/Cashmere Beige ARTICO Leather")) {
b3 = 350;
txt6.setText("350.0");
panel.add(txt6);
}
}
//panel
if (e.getSource() == cboCColor) {
String one1 = (String) cboCColor.getSelectedItem();
if (one1.equals("Aluminum")) {
c1 = 300;
txt6.setText("300.0");
panel.add(txt6);
} else if (one1.equals("Burl Walnut Wood")) {
c2 = 0;
txt6.setText("0.0");
panel.add(txt6);
} else if (one1.equals("Dark Ash Wood")) {
c3 = 0;
txt6.setText("0.0");
panel.add(txt6);
}
}
//Double b1ll = Double.parseDouble(text1.getText());
Double total = m + a + b + c + d + d1 + f + g + h + a1 + a2 + a3 +a4 + b1 + b2 + b3+ c1 + c2 +c3;
Double total1 = a + b + c + d + d1 + f + g + h;
Double totala = a1 + a2 + a3 +a4 + b1 + b2 + b3+ c1 + c2 +c3;
Double FinalC= total + k;// - b1ll ;
String total2 = Double.toString(total);
String total21 = Double.toString(total1);
String totalm = Double.toString(totala);
String Final = Double.toString(FinalC);
txt1.setText(total2);
txt3.setText(total21);
txt6.setText(totalm);
txt4.setText(Final);
validate();
}
}
最佳答案
这个....
这就是为什么你应该使用适当的布局管理器......
关于你的问题...
您不断收到 NullPointerException
因为(据我测试),m
和 k
是 空
...
您正在为所有控件(接受它们的控件)使用 ItemListener
监听器的单个实例,这是一个非常糟糕的主意,因为它很难确定 1- 当前状态和2- 是什么导致了事件...
就个人而言,我更喜欢尽可能使用单独的监听器,这样我就可以准确地隔离正在发生的事情......
如果将 m
和 k
更改为 double
而不是 Double
,这将解决眼前的问题
下一个问题是比较组合框中的值...
在您的事件处理程序中,您正在使用 if (one.equals("Passion Red")) {
检查颜色选项,但实际条目是 Passion Red [add $200.00 ]
,意味着它永远不会匹配...
我假设您有许多此类问题,因此您将不得不深入研究您的代码以找到所有问题...
关于java - JComboBox 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22369522/
关闭。这个问题是off-topic .它目前不接受答案。 想要改进这个问题? Update the question所以它是on-topic用于堆栈溢出。 关闭 12 年前。 Improve thi
我有一个动态网格,其中的数据功能需要正常工作,这样我才能逐步复制网格中的数据。假设在第 5 行中,我输入 10,则从第 6 行开始的后续行应从 11 开始读取,依此类推。 如果我转到空白的第一行并输入
我有一个关于我的按钮消失的问题 我已经把一个图像作为我的按钮 用这个函数动画 function example_animate(px) { $('#cont
我有一个具有 Facebook 连接和经典用户名/密码登录的网站。目前,如果用户单击 facebook_connect 按钮,系统即可运行。但是,我想将现有帐户链接到 facebook,因为用户可以选
我有一个正在为 iOS 开发的应用程序,该应用程序执行以下操作 加载和设置注释并启动核心定位和缩放到位置。 map 上有很多注释,从数据加载不会花很长时间,但将它们实际渲染到 map 上需要一段时间。
我被推荐使用 Heroku for Ruby on Rails 托管,到目前为止,我认为我真的会喜欢它。只是想知道是否有人可以帮助我找出问题所在。 我按照那里的说明在该网站上创建应用程序,创建并提交
我看过很多关于 SSL 错误的帖子和信息,我自己也偶然发现了一个。 我正在尝试使用 GlobalSign CA BE 证书通过 Android WebView 访问网页,但出现了不可信错误。 对于大多
我想开始使用 OpenGL 3+ 和 4,但我在使用 Glew 时遇到了问题。我试图将 glew32.lib 包含在附加依赖项中,并且我已将库和 .dll 移动到主文件夹中,因此不应该有任何路径问题。
我已经盯着这两个下载页面的源代码看了一段时间,但我似乎找不到问题。 我有两个下载页面,一个 javascript 可以工作,一个没有。 工作:http://justupload.it/v/lfd7不是
我一直在使用 jQuery,只是尝试在单击链接时替换文本字段以及隐藏/显示内容项。它似乎在 IE 中工作得很好,但我似乎无法让它在 FF 中工作。 我的 jQuery: $(function() {
我正在尝试为 NDK 编译套接字库,但出现以下两个错误: error: 'close' was not declared in this scope 和 error: 'min' is not a m
我正在使用 Selenium 浏览器自动化框架测试网站。在测试过程中,我切换到特定的框架,我们将其称为“frame_1”。后来,我在 Select 类中使用了 deselectAll() 方法。不久之
我正在尝试通过 Python 创建到 Heroku PostgreSQL 数据库的连接。我将 Windows10 与 Python 3.6.8 和 PostgreSQL 9.6 一起使用。 我从“ht
我有一个包含 2 列的数据框,我想根据两列之间的比较创建第三列。 所以逻辑是:第 1 列 val = 3,第 2 列 val = 4,因此新列值什么都没有 第 1 列 val = 3,第 2 列 va
我想知道如何调试 iphone 5 中的 css 问题。 我尝试使用 firelite 插件。但是从纵向旋转到横向时,火石占据了整个屏幕。 有没有其他方法可以调试 iphone 5 中的 css 问题
所以我有点难以理解为什么这不起作用。我正在尝试替换我正在处理的示例站点上的类别复选框。我试图让它做以下事情:未选中时以一种方式出现,悬停时以另一种方式出现(选中或未选中)选中时以第三种方式出现(而不是
Javascript CSS 问题: 我正在使用一个文本框来写入一个 div。我使用以下 javascript 获取文本框来执行此操作: function process_input(){
你好,我很难理解 P、NP 和多项式时间缩减的主题。我试过在网上搜索它并问过我的一些 friend ,但我没有得到任何好的答案。 我想问一个关于这个话题的一般性问题: 设 A,B 为 P 中的语言(或
你好,我一直在研究 https://leetcode.com/problems/2-keys-keyboard/并想到了这个动态规划问题。 您从空白页上的“A”开始,完成后得到一个数字 n,页面上应该
我正在使用 Cocoapods 和 KIF 在 Xcode 服务器上运行持续集成。我已经成功地为一个项目设置了它来报告每次提交。我现在正在使用第二个项目并收到错误: Bot Issue: warnin
我是一名优秀的程序员,十分优秀!