Moderator: JIDE Support
import com.jidesoft.popup.JidePopup;
import java.awt.event.*;
import javax.swing.*;
public class JidePopupTest {
public static void main(String[] args) {
final JFrame frame = new JFrame();
final JButton button = new JButton("Show popup");
frame.getContentPane().add(button);
final JidePopup popup = new JidePopup();
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// popup.setPreferredPopupSize(null);
popup.showPopup(button);
}
});
final JPanel popupContentPane = new JPanel();
popupContentPane.add(new JLabel("popup content pane"));
popup.setContentPane(popupContentPane);
frame.setSize(200, 100);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}
Return to JIDE Common Layer Open Source Project Discussion (Community Driven)
Users browsing this forum: Bing [Bot] and 8 guests