luke patte

Greenhorn
+ Follow
since Jan 11, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by luke patte

Hi,
I'm having trouble reopening JInternalFrames after they have neen shut.
i've tried things like
Frame.show();
Frame.setVisible(true);
frame.setClosed(false);
frame.setIcon(false);
but it wont reopen it, only deiconify it etc. Any help would be much appreciated.
Cheers
20 years ago
Is there a method to get user input by using a drop down menu, and if the item is not held in the menu then the user can type one in in the box? Such as below, only with the box editable
Object[] possibilities = {"ham", "spam", "yam"};
String s = (String)JOptionPane.showInputDialog(
frame,
"Complete the sentence:\n"
+ "\"Green eggs and...\"",
"Customized Dialog",
JOptionPane.PLAIN_MESSAGE,
icon,
possibilities,
"ham");
cheers all
21 years ago
Hi all,
I have code similar to that below, it all works fine when the user clicks the yes and no button, however when the user uses tab to select the button and presses enter to select the button, it doesn't perform as I want. I think maybe an extra event is produced, is this the case and how can I stop it??
int n = JOptionPane.showConfirmDialog(.....JOptionPane.YES_NO_OPTION)
if (n == JOptionPane.YES_OPTION) {
..........}
if(n == JOptionPane.NO_OPTION) {
............}
Cheers
luke
21 years ago
I'm having trouble deleting JPanels that are in my JTextPanes by using a method call (ie .remove(jPanel)), does this work or am I limited to only deleting through the del or backspace keys?? Also, I need to highlight an area and if a jlabel is within the selectionI need to be able to find out which label it is to perform actions upon it, any ideas??
thanks luke
21 years ago
Cheers that worked a treat.
21 years ago
I have a JPanel in a JWindow with an event which creates a JTextField, however, the JTextField does no appear immediately after it is created but only appears when I resize the window. I'd like the text field to apear as soon as it is created, any ideas??
thanks
21 years ago
I have got JLabels in JTextPanes at the moment, but is there a way to not allow them to be deleted by the del or backspace button??
thanks
luke
21 years ago
Hi, Is there any way to get a JOptionPane.showInputDialog combo box to be editable, such as in
combo=new JComboBox();
combo.setEditable(true);
?? Thanks
luke
21 years ago
Is there a listener that will trigger an event when different JInternalFrames within a JDesktopPane are selected (ie brought to front)??
thanks
luke
21 years ago
Is there a method to create a jWindow with an internal scrollPane that follows the size of the window when it is resized , in the same way that explorer has scrollbars that change size and dependent on the window content and follows its edges when resized. Thanks
luke
21 years ago
I need help with HashSets
I have classes A with a String attribue "name".
I have a Hash set that contains a set of different classes B
each B is instantiated by passing A (to be stored as an attribute of B) along with other data.
I need to be able to change the name of an instance of A and have this change propogated to change the A attribute in all classes of B using that instance.
Does anyone know of a method to do this without iterating through the hashset of B's, as it's a big hash set?
Thanks in advance
luke
21 years ago
Hi, I was wondering if there is a way to make specific single words in a JTextArea uneditable. What I need is to allow single words to be moved around/deleted as a whole (as if a single character).. Thanks all
21 years ago