引用此评论
public static void main(String[] s) throws Exception { BeautyEyeLNFHelper.frameBorderStyle = BeautyEyeLNFHelper.FrameBorderStyle.generalNoTranslucencyShadow; org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper.launchBeautyEyeLNF(); final JPopupMenu popupTable = new JPopupMenu(); // find panel JLabel findLabel = new JLabel("Filter for:"); findLabel.setPreferredSize(new Dimension(60, 20)); final JTextField findTextField = new JTextField(); findTextField.setColumns(10); final JPanel container = new JPanel(); container.setBackground(new JMenuItem().getBackground()); // panel must have the same background with JMenuItems container.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 0)); container.add(findLabel); container.add(findTextField); popupTable.add(container); JButton button = new JButton("Action"); JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new FlowLayout(FlowLayout.CENTER)); buttonPanel.add(button); JPanel panel = new JPanel(); panel.setLayout(new BorderLayout()); panel.add(popupTable, BorderLayout.CENTER); panel.add(buttonPanel, BorderLayout.SOUTH); final JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(900, 800); frame.getContentPane().setLayout(new BorderLayout()); frame.getContentPane().add(panel, BorderLayout.CENTER); frame.setVisible(true); button.addActionListener ( new ActionListener() { public void actionPerformed(ActionEvent e) { int x = (frame.getWidth() / 2); int y = (frame.getHeight() / 2); popupTable.show(frame, x, y); } } ); }
引用:zjj7188 发表于 2016-04-19 16:51 嗯,我用的是beautyeye-3.7,我直接把上面的代码复制过来运行了下,还是不能编辑的,把 org.jb2011.lnf. ...
引用:zjj7188 发表于 2016-04-19 17:51 我的jdk是jdk1.8.0_45 你的测试的时候源码 org.jb2011.lnf.beautyeye.ch7_popup.TranslucentPopupFactor ...
be.png (22.4 KB, 下载次数: 1373)
下载附件 保存到相册
8 年前 上传
精华主题数超过100个。
连续任职达2年以上的合格正式版主
为论区做出突出贡献的开发者、版主等。
Copyright © 2014-2024 即时通讯网 - 即时通讯开发者社区 / 版本 V4.4
苏州网际时代信息科技有限公司 (苏ICP备16005070号-1)
Processed in 0.093748 second(s), 29 queries , Gzip On.