引用:zjj7188 发表于 2016-04-26 17:16 好的,谢谢 |
引用:zjj7188 发表于 2016-04-19 17:51 我靠,我提交的代码忘了设成true了,v3.7里应该是要被设置成true的!
|
引用:JackJiang 发表于 2016-04-19 17:20 我的jdk是jdk1.8.0_45 你的测试的时候源码 org.jb2011.lnf.beautyeye.ch7_popup.TranslucentPopupFactory.java 这里是 setFocusableWindowState(false); ? 我改为true之后才可以编辑 |
引用:zjj7188 发表于 2016-04-19 16:51 我确信我当时测过上面给你的代码里是可以编辑的。 你或许更新一下JDK试试?排除一下JDK的原因。我用的JDK是1.6.18 |
引用:JackJiang 发表于 2016-04-19 09:26 嗯,我用的是beautyeye-3.7,我直接把上面的代码复制过来运行了下,还是不能编辑的,把 org.jb2011.lnf.beautyeye.ch7_popup.TranslucentPopupFactory.java 的第417行: “setFocusableWindowState(false);” 改为true 后就可以进行编辑 但是,这个文本框就失去不了焦点了,一直onFocus |
| 老外的这个代码我调试过,可以执行的,你放到eclipse里去试试,或许能给你启发! |
|
你可以把这段代码放到Eclipse里去执行看看,BeautyEye v3.7里解决了这个老外说的问题(你可以用v3.6对比一下,换个beautyeye的jar包就行)。 不知你描述的问题是否跟老外是一样的,你看看他的代码,或许能给你启发! 》BeautyEye的v3.7版解决的这个问题是老外提出来的,老外反馈的原话是: “The JTextField is not editable. If you remove beautyeye the field becomes editable” 》老外给出的出问题的代码如下: 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);
}
}
);
} |