社区
Java SE
帖子详情
swing组件的问题!
Virginer
2001-06-01 08:54:00
我在做一个applet有用到JComboBox组件,但是在运行以后,
我发现它不能showPopup。各位大侠,请想想办法。多谢!
...全文
459
23
打赏
收藏
swing组件的问题!
我在做一个applet有用到JComboBox组件,但是在运行以后, 我发现它不能showPopup。各位大侠,请想想办法。多谢!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
23 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
Virginer
2001-07-23
打赏
举报
回复
up
wolfsquare
2001-06-04
打赏
举报
回复
IE的Swing支持是SUN自己写的插件.
wolfsquare
2001-06-04
打赏
举报
回复
to treefield(都市蚂蚁) :
不是IE支持不好,是根本不支持Swing
fltwt
2001-06-04
打赏
举报
回复
升级JDK或JRE的版本到1.3.1。
如果你确信你的程序没问题的话。
treefield
2001-06-03
打赏
举报
回复
Swing在IE中有问题(IE支持不好)
wolfsquare
2001-06-01
打赏
举报
回复
我的是JBuilder +JDK1.2 & JBuilder +JDK1.3
IE JDK1.3通过,没有任何问题,除了 那个少了的 "b" 的border2 :)
Virginer
2001-06-01
打赏
举报
回复
谢谢大家了!
我在JBuilder中不能够showPopup,
但是在IE中就可以!
wolfsquare
2001-06-01
打赏
举报
回复
可以正常显示呀.
Virginer
2001-06-01
打赏
举报
回复
to wolfsquare(狼平方):
你看到问题所在了吗?
wolfsquare
2001-06-01
打赏
举报
回复
我这里没有问题.
Virginer
2001-06-01
打赏
举报
回复
请大家帮助我想想办法,谢谢了!
Virginer
2001-06-01
打赏
举报
回复
当然可以啊!
flyzhen
2001-06-01
打赏
举报
回复
你的JApplet在ie里能够看到吗?
Virginer
2001-06-01
打赏
举报
回复
JBuilder4.0 的JDK是java 1.3.0-C。
不是不能显示选择框,而是当点击时,
不能shopPopup。
binriyue
2001-06-01
打赏
举报
回复
你说哪一个选择框不能显示,我在我的jb里面都可以呀!
Virginer
2001-06-01
打赏
举报
回复
谢谢大家!
我用JBuilder4.0 Enterprise
Virginer
2001-06-01
打赏
举报
回复
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.net.*;
import javax.swing.*;
import javax.swing.border.*;
public class PanlelText extends JApplet
{
//private InetAddress remote;
//private RemoteDataTable dt;
//private long handle = 0;
//private String SoftPLC = "192.168.78.224";
//private String sDataTable = "n007:002";
boolean isStandalone = false;
JComboBox jComboBox1 = new JComboBox();
JComboBox jComboBox2 = new JComboBox();
Border border1;
JComboBox jComboBox3 = new JComboBox();
JButton jButton1 = new JButton();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JLabel jLabel3 = new JLabel();
JLabel jLabel4 = new JLabel();
Border border2;
FlowLayout flowLayout1 = new FlowLayout();
/**Get a parameter value*/
public String getParameter(String key, String def)
{
return isStandalone ? System.getProperty(key, def) :
(getParameter(key) != null ? getParameter(key) : def);
}
/**Construct the applet*/
public PanlelText()
{
/*try
{
remote = InetAddress.getByName( SoftPLC );
dt = new RemoteDataTable( null, remote, 500 );
handle = dt.handle( sDataTable );
}catch( Exception e1)
{
return;
}*/
}
/**Initialize the applet*/
public void init()
{
try
{
jbInit();
}
catch(Exception e)
{
e.printStackTrace();
}
}
/**Component initialization*/
private void jbInit() throws Exception
{
jComboBox1.addItem("aa");
jComboBox1.addItem("bb");
jComboBox2.addItem("aa");
jComboBox2.addItem("bb");
jComboBox3.addItem("aa");
jComboBox3.addItem("bb");
JPanel jPanel1 = new JPanel();
order2 = BorderFactory.createEmptyBorder();
this.setSize(new Dimension(500, 191));
jPanel1.setBackground(new Color(192, 192, 255));
jPanel1.setBorder(BorderFactory.createEtchedBorder());
jPanel1.setToolTipText("");
JPanel jPanel2 = new JPanel();
jPanel2.setBorder(BorderFactory.createEtchedBorder());
jPanel2.setLayout(flowLayout1);
jComboBox1.setAutoscrolls(true);
jComboBox1.setBorder(BorderFactory.createEtchedBorder());
jComboBox1.setPreferredSize(new Dimension(60, 20));
jComboBox3.setBorder(border2);
jComboBox3.setPreferredSize(new Dimension(60, 20));
jComboBox2.setAutoscrolls(true);
jComboBox2.setBorder(BorderFactory.createEtchedBorder());
jComboBox2.setPreferredSize(new Dimension(60, 20));
jComboBox2.setEditor(null);
jButton1.setBorder(BorderFactory.createEtchedBorder());
jButton1.setPreferredSize(new Dimension(60, 20));
jButton1.setText("OK");
jLabel1.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel1.setText("模块类型");
jLabel2.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel2.setText("模块位置");
jLabel3.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel3.setText("通道号");
jLabel4.setFont(new java.awt.Font("Dialog", 1, 5));
jLabel4.setToolTipText("");
jLabel4.setText(" ");
this.getContentPane().add(jPanel1, BorderLayout.WEST);
this.getContentPane().add(jPanel2, BorderLayout.EAST);
jPanel2.add(jLabel1, null);
jPanel2.add(jComboBox1, null);
jPanel2.add(jLabel2, null);
jPanel2.add(jComboBox2, null);
jPanel2.add(jLabel3, null);
jPanel2.add(jComboBox3, null);
jPanel2.add(jLabel4, null);
jPanel2.add(jButton1, null);
jPanel1.setPreferredSize(new Dimension(430, 191));
jPanel2.setPreferredSize(new Dimension(70, 191));
}
/**Get Applet information*/
public String getAppletInfo()
{
return "Applet Information";
}
/**Get parameter info*/
public String[][] getParameterInfo()
{
return null;
}
//static initializer for setting look & feel
static
{
try {
//UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
//UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
}
catch(Exception e)
{
}
}
}
AUTOFANS
2001-06-01
打赏
举报
回复
具体点
binriyue
2001-06-01
打赏
举报
回复
把你的代码拿来看看呀。
wolfsquare
2001-06-01
打赏
举报
回复
不行就贴代码上来.
加载更多回复(3)
java课程设计界面美化包,
swing
也可以这么漂亮
4. 更新界面:一旦LookAndFeel设置完成,需要调用`
Swing
Utilities.updateComponentTreeUI()`方法,更新所有
Swing
组件
以应用新的外观。 压缩包中的"Demo"文件很可能是包含了实现这些步骤的源代码示例。通过分析和...
Java
Swing
图形界面开发与案例详解
第3~15章结合众多实例和
问题
介绍最常用、最有用的
组件
及其应用方法,包括标签和按钮
组件
、布局管理器
组件
、面板
组件
、列表框
组件
、下拉列表框
组件
、进度条
组件
、时间
组件
、滑块
组件
、分隔条
组件
、选取器
组件
、文本...
Swing
Hacks[电子书+书中源码]
Java编程语言一般是和重要的企业级应用程序联系在一起的,...\r\n 在
Swing
中构建分层、覆盖
组件
并灵活使用透明窗格屏蔽
Swing
接口内部的复杂细节和伸缩性。 ================================== 对学习
SWING
很有帮助!
java浏览器+
swing
嵌套网页+源码免费
1. **创建
Swing
组件
**:首先,创建一个`JFrame`作为主窗口,然后在其中添加一个可以显示网页的
组件
,如`JEditorPane`或自定义的`JWebPane`替代。 2. **加载网页内容**:使用`setPage`方法加载URL指定的网页,或者...
swing
包和需要的jar包上传
Swing
组件
基于Java的事件驱动模型,允许用户与UI进行交互。
Swing
包中的主要类和接口包括: 1. **JFrame**: 这是所有
Swing
应用的基础,通常作为窗口的主要容器。开发者可以在JFrame上添加其他
组件
来构建应用程序...
Java SE
62,625
社区成员
307,257
社区内容
发帖
与我相关
我的任务
Java SE
Java 2 Standard Edition
复制链接
扫一扫
分享
社区描述
Java 2 Standard Edition
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章