Displayable container and JButton
Hi everybody. First, I want to apologize if my thread title is not very clear :o. I want to ask you to help me with this problem. I've just seen the JDateChooser component toedter.com (Java & More) website. I am programming a component very similar to this JDateChooser component, is to say, I want to have a JTextField and a JButton together. When the button is pressed it have to display a component (a JPanel I think) to show me some fields to input data and make calculations and put the result into the JTextField. How can I do this? I am sure it is very similar to this component because when the JDateChooser button is pressed the calendar appears to choose the date and put the selected one into the JTextField. How can I program the calendar container? And how can I make appear this container next to the text field? :confused:
Here's an image of this JDateChooser component:
JDialog and setUndecorated method
Hi everybody. And that's true Fubarable, JDialog inherits from Dialog and setUndecorated method exists but produces this exception:
Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: The dialog is displayable.
at timepicker.MainFrame.clockButtonActionPerformed(Ma inFrame.java:49)
at timepicker.MainFrame$1.actionPerformed(MainFrame.j ava:37)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:242)
But if still it could work it would be just a little window near the text field and the button then I'd have to deal with focus issues. I'm sure it is possible to have this container joined to the text field and the button, just like the DateTimePicker component from Lavantech but how? I don't know yet.