如何把结果集放到JAVA中的下拉表单里啊?(注意:不是JSP是纯JAVA)解决马上给分 class Stars extends Frame{ Choice one=new Choice(); .... one.addItem("需要的"); .... add(one); ....}学的不好,只做参考. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 package com.surge.business;import javax.swing.*;import java.awt.*;import java.util.ArrayList;/** * <p>Title: 巨澜客户管理平台(实现旧系统开户管理)</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2000-2004</p> * <p>Company: 深圳市巨澜信息技术有限公司</p> * @author 张翅飞 [e-mail:[email protected]] * @version 1.0 */public class Frame extends JFrame{ GridBagLayout gridBagLayout1 = new GridBagLayout(); JComboBox box = new JComboBox(); public static void main(String[] args) { Frame frame = new Frame(); frame.setSize(800, 600); frame.show(); } public Frame() { try { jbInit(); } catch (Exception ex) { ex.printStackTrace(); } } void jbInit() throws Exception { ArrayList list = new ArrayList(); list.add("test1"); list.add("test2"); list.add("test3"); list.add("test4"); for (int i = 0; i < list.size(); i++) { box.addItem((String)list.get(i)); } this.getContentPane().setLayout(gridBagLayout1); this.getContentPane().add(box, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); }} java中的this造成StackOverflowError svn有的能提交,有的不能提交 看看这个发代码怎么改运行时才没有exception 求救!怎么解答下面这道题目? 各位帮忙看下为何总是提示验证码不正确呢,请问如何 JSTL问题~! JComboBox能不能设定其内的一个选项不能被选中? 初级问题 通过映射实现对类的接管问题求助! 寻求将java程序编译成本地二进制代码的方法 ... 执行时出错,请高手指教! 关于对数据库进行更新后发生的奇怪的问题~`````````~~~~~``````````
import java.awt.*;
import java.util.ArrayList;/**
* <p>Title: 巨澜客户管理平台(实现旧系统开户管理)</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2000-2004</p>
* <p>Company: 深圳市巨澜信息技术有限公司</p>
* @author 张翅飞 [e-mail:[email protected]]
* @version 1.0
*/public class Frame extends JFrame
{
GridBagLayout gridBagLayout1 = new GridBagLayout();
JComboBox box = new JComboBox();
public static void main(String[] args)
{
Frame frame = new Frame();
frame.setSize(800, 600);
frame.show();
} public Frame()
{
try
{
jbInit();
}
catch (Exception ex)
{
ex.printStackTrace();
}
} void jbInit() throws Exception
{
ArrayList list = new ArrayList();
list.add("test1");
list.add("test2");
list.add("test3");
list.add("test4"); for (int i = 0; i < list.size(); i++)
{
box.addItem((String)list.get(i));
} this.getContentPane().setLayout(gridBagLayout1);
this.getContentPane().add(box, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); }
}