SeeYa
Time to sign off these lists when the spam exceeds the real traffic. Cya. J John Zukowski, Strategic Java Consulting JZ Ventures, Inc. - http://www.jzventures.com Java Collections - http://www.apress.com/catalog/book/1893115925/ The limits of my language are the limits of my world. - Wittgenstein ___ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing
Re: How to restric japanese characters
To disable copy and past you can remove the operations from the action map / input map. At 02:26 AM 9/27/2001 +0900, Ryuichiro Toda wrote: Hello, Bharat. Try to use this method. (JTextField object).enableInputMethods(false); But this code can't disable copy and paste. If you'd like to restrict this operation, You have to handle the events. John Zukowski, Strategic Java Consulting JZ Ventures, Inc. - http://www.jzventures.com Java Collections - http://www.apress.com/catalog/book/1893115925/ The limits of my language are the limits of my world. - Wittgenstein ___ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing
Swing Spam
Why is it that the Swing mailing lists tend to get more spam then almost all the other mailing lists I am on combined J John Zukowski, Strategic Java Consulting JZ Ventures, Inc. - http://www.jzventures.com Java Collections - http://www.apress.com/catalog/book/1893115925/ The limits of my language are the limits of my world. - Wittgenstein ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
Re: Set mnemonic for IInd A in Save As
The ability to do this was added to 1.4. At 04:15 PM 6/19/2001 -0400, Ramaraj Kalaiselvi wrote: Hi All: Does any one of you has a fix for this problem. Setting the mnemonic for Save As... sets for Ist a but i want to set for the uppercase A (standard format). I searched all over the forums. I found lots of other people haa similiar problem but couldn't find a solution for the same. Any help appreciated. Thanks. John Zukowski, Strategic Java Consulting JZ Ventures, Inc. - http://www.jzventures.com Java Collections - http://www.apress.com/catalog/book/1893115925/ The limits of my language are the limits of my world. - Wittgenstein ___ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing
Re: Swing on Palm OS or Win CE
Check out a company called savaJe (pronounced savage). They offer a J2SE version for various ARM platforms like the iPAQ. You can run Swing based programs then on the devices. At 04:27 PM 6/3/01 -0500, Fred Siegeltuch wrote: Soon I will make a purchase recommendation for my small college to standardize on a PDA for all students. Does either of the major platforms have a Swing enabled JVM? As a java developer, which platform would you prefer to develop on? John Zukowski, Strategic Java Consulting JZ Ventures, Inc. - http://www.jzventures.com Java Collections - http://www.apress.com/catalog/book/1893115925/ The limits of my language are the limits of my world. - Wittgenstein ___ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing
Re: What is the difference between paint() and paintComponent()?
Not exactly sure what you are asking for here If you want to create your own lightweight component, or customize the behavior of an existing one... in your subclass of JComponent, override paintComponent() to make sure things like the component's border are displayed. If you don't, and override paint() instead, then the methods paintComponent, paintBorder, and paintChildren won't be called, as that is what default paint() version does, ensuring each is given the appropriate drawing area. If you want to create your own heavyweight component, subclass Canvas and override paint(). If there is no UI delegate in Swing, you essentially don't have a component. It really needs one... You can also create your own UI delegate if you don't like the behavior of a component. At 04:41 AM 5/28/2001 -0400, D. Michael Nelson wrote: So far, this is what I have figured out, which is not much.(Graphic Java Mastering the JFC Vol II: Swing p.138) What is the difference between paint() and paintComponent()? The Jcomponent.paint() method actually delegates the work of painting to three protected methods: paintComponent, paintBorder, and paintChildren. They're called in the order listed to ensure that children appear on top of component itself. If the UI delegate is non-null (what if it is null?), Jcomponent.paintComponent() invokes the delegate's update() method, which clears the background for opaque components and subsequently paints the components. I think I am missing the big picture. Please, share any knowledg or resources you may have on this topic! John Zukowski, Strategic Java Consulting JZ Ventures, Inc. - http://www.jzventures.com Java Collections - http://www.apress.com/catalog/book/1893115925/ The limits of my language are the limits of my world. - Wittgenstein ___ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing
Re: Anyone implemented a JButton in a cell of a JTable ?
Grab my book. J At 04:31 PM 5/9/2001 +, [EMAIL PROTECTED] wrote: Hi, anyone implemented a JButton in a cell... Please send me the code (for the table, cell renderer and the bit that performs the actual click...) John Zukowski, Strategic Java Consulting JZ Ventures, Inc. - http://www.jzventures.com Java Collections - http://www.apress.com/catalog/book/1893115925/ The limits of my language are the limits of my world. - Wittgenstein ___ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing
Re: Message for the list archiver
The March archive is labeled 2001. However, somebody had their date set to 2002 for their messages so they show up in folder for 2002. Its all automated. J At 12:20 AM 4/7/2001 -0700, Robert Nicholson wrote: I think the March archive should be labelled for the year 2001 not 2002 It looks like the date on the archiving machine is all screwed up. John Zukowski, Strategic Java Consulting JZ Ventures, Inc. - http://www.jzventures.com Java Collections - http://www.apress.com/catalog/book/1893115925/ The limits of my language are the limits of my world. - Wittgenstein ___ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing
Re: memory leak... some one help, please!!
You don't null out tempString between calls to append() so it keeps growing. A StringBuffer is probably your better data structure, but it too would need to be emptied between calls. J At 11:33 AM 4/6/2001 -0400, Pepelis, Aaron wrote: why is there a memory leak in this? it just keeps grow and growing and growing... someone help me please... this brought a over night test up to 166MB of memory usage... thanks aaron import javax.swing.*; import java.awt.*; import javax.swing.text.*; public class BufferedOutputArea extends JTextArea { private int size_of_buffer; private int cut_back = 0; String tempString; public BufferedOutputArea( int buffer) { this(buffer, 0); } public BufferedOutputArea( int buffer, int cut_back) { size_of_buffer = buffer; this.cut_back = cut_back; } public void setBufferSize(int buffer) { size_of_buffer = buffer; } public int getBufferSize() { return size_of_buffer; } public void append(String str) { tempString = getText()+str; super.append(str); if (tempString.length() this.size_of_buffer) { try { System.out.println("hit "+str + "\n" + size_of_buffer + " " + cut_back + " " + tempString.length()); // setText(getText(cut_back, tempString.length())); getDocument().remove(0,tempString.length() - this.size_of_buffer + cut_back); System.out.println(""+getText().length()); } catch (BadLocationException e) { } } setCaretPosition(getText().length()); } public static void main(String [] args) { JFrame frame = new JFrame(); BufferedOutputArea output = new BufferedOutputArea(5000, 2000); JScrollPane scroll = new JScrollPane(output); scroll.setAutoscrolls(true); frame.getContentPane().add(scroll); frame.setSize(500,500); frame.setVisible(true); output.append("hello you think\nthat you are so cool\njust because your gnigg?\n"); try { for (int i= 0; i 400; i++) { output.append("fudge this out put " + i + "\n39\n" ); Thread.sleep(300); } } catch (Exception e) { } } } John Zukowski, Strategic Java Consulting JZ Ventures, Inc. - http://www.jzventures.com The limits of my language are the limits of my world - Wittgenstein ___ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing
RE: memory leak... some one help, please!!
That I don't know, but I did notice that tempString is kept set between calls. And THAT isn't necessary. I'm not quite sure why the variable is an instance variable. It seems only used within the method. I'd change the variable scope, too. At 04:59 PM 4/6/2001 +0100, Neil Thorne wrote: I don't see how not nulling the temp string would lead to 166MB of memory. It only gets called 400 times... -Original Message- From: John Zukowski [mailto:[EMAIL PROTECTED]] Sent: 06 April 2001 16:53 To: Pepelis, Aaron; [EMAIL PROTECTED] Subject: Re: memory leak... some one help, please!! You don't null out tempString between calls to append() so it keeps growing. A StringBuffer is probably your better data structure, but it too would need to be emptied between calls. J At 11:33 AM 4/6/2001 -0400, Pepelis, Aaron wrote: why is there a memory leak in this? it just keeps grow and growing and growing... someone help me please... this brought a over night test up to 166MB of memory usage... thanks aaron import javax.swing.*; import java.awt.*; import javax.swing.text.*; public class BufferedOutputArea extends JTextArea { private int size_of_buffer; private int cut_back = 0; String tempString; public BufferedOutputArea( int buffer) { this(buffer, 0); } public BufferedOutputArea( int buffer, int cut_back) { size_of_buffer = buffer; this.cut_back = cut_back; } public void setBufferSize(int buffer) { size_of_buffer = buffer; } public int getBufferSize() { return size_of_buffer; } public void append(String str) { tempString = getText()+str; super.append(str); if (tempString.length() this.size_of_buffer) { try { System.out.println("hit "+str + "\n" + size_of_buffer + " " + cut_back + " " + tempString.length()); // setText(getText(cut_back, tempString.length())); getDocument().remove(0,tempString.length() - this.size_of_buffer + cut_back); System.out.println(""+getText().length()); } catch (BadLocationException e) { } } setCaretPosition(getText().length()); } public static void main(String [] args) { JFrame frame = new JFrame(); BufferedOutputArea output = new BufferedOutputArea(5000, 2000); JScrollPane scroll = new JScrollPane(output); scroll.setAutoscrolls(true); frame.getContentPane().add(scroll); frame.setSize(500,500); frame.setVisible(true); output.append("hello you think\nthat you are so cool\njust because your gnigg?\n"); try { for (int i= 0; i 400; i++) { output.append("fudge this out put " + i + "\n3 9\n" ); Thread.sleep(300); } } catch (Exception e) { } } } John Zukowski, Strategic Java Consulting JZ Ventures, Inc. - http://www.jzventures.com The limits of my language are the limits of my world - Wittgenstein ___ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing ** This email is intended only for the addressee. This email and any files transmitted with it may contain confidential or privileged information. If you are not the named addressee or the person responsible for delivering the message to the named addressee, please contact [EMAIL PROTECTED] This email has been scanned by MAILsweeper. ** John Zukowski, Strategic Java Consulting JZ Ventures, Inc. - http://www.jzventures.com The limits of my language are the limits of my world - Wittgenstein ___ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing
Re: How to Access DefaultEditorKit.SelectAllAction and other Nonpublic Classes?
Action actions[] = component.getActions(); Gets all the actions for the component of interest. Just pull out the select-all one. J P.S. There is an example that does this in my Swing book. John Zukowski, Strategic Java Consulting JZ Ventures, Inc. - http://www.jzventures.com http://www.jGuru.com -- Your view of the Java Universe The limits of my language are the limits of my world. - Wittgenstein ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
Re: swing book
In my biased opinion, I kinda like mine Definitive Guide to Swing for Java 2, 2nd ed. http://www.amazon.com/exec/obidos/ASIN/189311578X/johnzukowshomefo/ You might also like Core Swing http://www.amazon.com/exec/obidos/ASIN/0130832928/johnzukowshomefo/ or Manning's Swing book http://www.amazon.com/exec/obidos/ASIN/1884777848/johnzukowshomefo/ You can read this one online at http://manning.spindoczine.com/sbe/ to see for yourself before buying. I used to like the O'Reilly Swing book but the book has gotten a little dated, having not been updated since 1998. At 11:25 AM 3/8/2001 -0500, Josh Howe wrote: Can anybody recommend a good advanced Swing book. I'm not looking for a reference, I'm looking for an explanation of how the guts of Swing really work. John Zukowski, Strategic Java Consulting JZ Ventures, Inc. - http://www.jzventures.com The limits of my language are the limits of my world - Wittgenstein ___ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing
Re: How do I listen for when JComboBox is about to drop down its list ?
See http://java.about.com/compute/java/library/weekly/aa080400a.htm At 11:34 AM 1/23/2001 -0800, Vella, John wrote: I need to dynamically populate the list for a non-editable JComboBox at the moment a user clicks on it. I can't seem to find any documentation that talks about how to install the appropriate listener to support this. ___ Swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/swing