Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JTextField in JPopupMenu is disabled #2

Open
alkiskal opened this issue Oct 14, 2015 · 3 comments
Open

JTextField in JPopupMenu is disabled #2

alkiskal opened this issue Oct 14, 2015 · 3 comments

Comments

@alkiskal
Copy link

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.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);
            }
        }
    );
}
@JackJiang2011
Copy link
Owner

I'll reply u later.

@JackJiang2011
Copy link
Owner

You can find class org.jb2011.lnf.beautyeye.ch7_popup.TranslucentPopupFactory source code at line 416, change "setFocusableWindowState(false);" to "setFocusableWindowState(true);" or just delete this line.

Or give me your mail adress, i'll send a BeautyEye revision to you later.

Hope you enjoy it!

@alkiskal
Copy link
Author

Thank you so much for the immediate solution. I've already made the change so no need. Have fun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants