program which extracts a jar file(urgent)
Hi Folks, I need a program which can extract a jar file. I can not use jar.exe. Thanks in advanced. - Bharat _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
Sound api
Hi, I am trying to play a .au file from an application with jdk 1.3 and am getting exception IllegalArgumentException while doing AudioSystem.getLine(). Now this is because AudioSystem.isLineSupported(...) is returning false. Foll. is the way I am doing it... InputStream is = ClassLoader.getSystemResourceAsStream(Bounce.au) ; AudioInputStream ais = AudioSystem.getAudioInputStream(is) ; AudioFormat format = ais.getFormat(); DataLine.Info info = new DataLine.Info(Clip.class, format); if ( AudioSystem.isLineSupported(info) ) /*- here it fails...-*/ { line = (Clip) AudioSystem.getLine(info); line.open(ais); } Please let me know if I am missing something here. Thanks, Bharat. _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
Is JOptionPane internationalized ?
Hi folks, I am testing my software for internationalization (Japanese) on w2k and solaris.I am using JOptionPane for warning dialogs, error dialogs etc. On Japanese W2k machine the "OK", "Cancel".. buttons are displayed in Japanese but on Japanese solaris machine they are still displayed in english. I am using jre1.3.Are there any registered bug for this? I saw some bugs but they all are closed. Thanks - bharat
Re: [Advanced-java] Re: Is JOptionPane internationalized ?
Yes basic_jp.properties is missing from rt.jar. Is there any i18n version of jre available ? Or I can get basic_jp.properties from somewhere ? Thanks - bharat Bharat - Check to see if the rt.jar in your Solaris JRE contains a Japanese language file named basic_jp.properties. This is the file would probably contain the Japanese strings. (The file basic.properties is what contains the English strings.) However, there are several problems with JFileChooser. For details, check out the Javadoc in this TFileChooser class I wrote: http://www.cpcug.org/user/kbennett/java/TFileChooser.java Use of this class, and supporting configuration, corrects the JFileChooser problems. Hopefully in JDK 1.4 these things will all be fixed. By the way, can anyone suggest a place for me to send/put this file so that it is available to the Java community? Thanks. - Keith Bharat wrote: Hi folks, I am testing my software for internationalization (Japanese) on w2k and solaris. I am using JOptionPane for warning dialogs, error dialogs etc. On Japanese W2k machine the OK, Cancel.. buttons are displayed in Japanese but on Japanese solaris machine they are still displayed in english. I am using jre1.3. Are there any registered bug for this? I saw some bugs but they all are closed. Thanks - bharat ___ Advanced-java mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/advanced-java _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
Re: How to restric japanese characters
Hi folks, First, I must thank you for all ur responses. I have come to a solution which is working so far. I have added a keylistener to my JtextField which is validating each character which is typed or pasted in the textfiled. I have written following code to check if the character is non english. public static boolean isNonEnglishChar(char c){int i = (int) c;System.out.println("char " +c +" =" + i);if( (i32) || ( i126))return true;return false;} Comments ??? - bharat - Original Message - From: Bharat To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] ; [EMAIL PROTECTED] Sent: Wednesday, September 26, 2001 9:29 AM Subject: How to restric japanese characters Hi folks, I want my JTextField to accept only english characters and it should reject japanese(or any other language) characters. Is there anyapi to do it?or a sample code which will help ? Thanks, - bharat
How to restric japanese characters
Hi folks, I want my JTextField to accept only english characters and it should reject japanese(or any other language) characters. Is there anyapi to do it?or a sample code which will help ? Thanks, - bharat
Need to find out the input language.
Hi, I can run my application in different languages, like Japanese on an English system, etc. Now I want to find out the language in which the user will type text, i.e. the language of keyboard. Is it possible with JRE 1.3 ? --Bharat _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
Jtable custom editor
Hi, I have cell editor to a custom text field which accepts only letters and digits. I have used table.setDefaultCellEditor(new DefaultCellEditor(new CustomTextField()); When I double click on the cell and type, key listener of my textfileld is called which accepts only letters and digits i.e. everything works fine. But when just single click on the cell and start typing, my custom text filed doesn't come in picture and every character is accepted. any clues ? Thanks - Bharat _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
Re: How to set font in JTree
I think you need to write custom renederer for your JTree. In the renderer we can set the font of the text based on the value of tree node. - Bharat Hi, generally I would use UIManager.put("Tree.font", myFont) to set a font for my JTree. But which name is to be set if I choose to display html-styled text for my nodes ??? (e.g. "htmlbbold text/b/html) Reason: the default font does not fit with the standard font Java selects (and that is my desired one). Many thanks in advance, Stefan. _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
Re: Code for a JTable with custom look
You need to write custom renderer of this JTable. Following code might help. public class MultiColorCellRenderer extends JLabel implements TableCellRenderer { public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if( 0 == row) { setBackground(Color.red); } else if( 0 == row) { setBackground(Color.green); } else { setBackground(table.getBackground()); } setText(value); return this; } } You need to set this renderer for ur table table.setDefaultRenderer(new MultiColorCellRenderer()); For header you need to write one more renderer with its paint overriden. Hi, I need to build a JTable that has: - custom rows (i.e. alternate colour rows, first one yellow, second one white, third one yellow etc) -column headers with a custom (blue) backColor -no borders. Does anyone have the code for this? _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
JSeparator
Hi Folks, JSeparator by default is etched. Is there any method to remove this etching and have a plain JSeparator. Thanks - Bharat
Some questions regarding JTable
Hi, I have some questions regarding JTable. You folks might help. - Header of my JTable is not visible. Once I add it to a scrollpane header becomes visible. Is it necessary to add JTable to a scrollpane ? - I have added a MouseListener to my JTable. I can get the column where the mouse is clicked. Is there any any method to get row also ? Thanks - Bharat _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing