program which extracts a jar file(urgent)

2002-01-04 Thread Bharat Dighe

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

2001-12-13 Thread Bharat Dighe

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 ?

2001-09-27 Thread Bharat



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 ?

2001-09-27 Thread Bharat

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

2001-09-26 Thread Bharat



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

2001-09-25 Thread Bharat



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.

2001-06-20 Thread Bharat Dighe

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

2001-03-18 Thread Bharat Dighe

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

2001-03-16 Thread Bharat Dighe

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

2001-03-04 Thread Bharat Dighe


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

2001-02-21 Thread Bharat Dighe



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

2001-02-13 Thread Bharat Dighe

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