Cursor Position!!
Hi all, Can anybody tell me how to get the cursor index in a textfield.. I used the methods getCaretPosition() and also getSelectionStart() to manipulate the cursor position. But it doesn't work If somebody has worked on this please help! Thanks, legin.
error in java speech api
when i try to run a simple program of java speech api in jdk it gives error that 'package javax.speech not found '. do i need anything extra for running speech program , should i have speech engine , isn't it inbuilt ? if not, from where i can get? from, nilesh. ___ Say Bye to Slow Internet! http://www.home.com/xinbox/signup.html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
mixing java pipes and unix-fifos?
hello, i am in the process of porting a C++ program to java this program uses at some point unix-fifos is there a way to open and write/read from unix fifos out of java? i looked at the PipeReader etc. but this seem to be a java-intern mechanism -- ciao bboett == [EMAIL PROTECTED] http://inforezo.u-strasbg.fr/~bboett http://erm1.u-strasbg.fr/~bboett === the total amount of intelligence on earth is constant. human population is growing -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Java and window managers
I'm using RedHat, XFree 3.3.6, and the latest IBM JDK 1.3 beta. When I started writing visual programs in Java I noticed some problems which I believe to be caused by AfterStep (1.8.1). I switched to KDE (1.1.2) and the problems dissapeared. KDE is good looking and all that but is slower and consumes more resources that AfterStep. Is anyone succesfully using a light windowmanager & java? Thanks. -- Julio Cesar Aguilar Cabrera [EMAIL PROTECTED] Laboratorio Nacional de Informatica Avanzada Xalapa, Veracruz, Mexico. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Java and window managers
--On Friday, July 28, 2000 12:28 PM -0500 Julio Cesar Aguilar Cabrera <[EMAIL PROTECTED]> wrote: > I'm using RedHat, XFree 3.3.6, and the latest IBM JDK 1.3 beta. > When I started writing visual programs in Java I noticed some > problems which I believe to be caused by AfterStep (1.8.1). > > I switched to KDE (1.1.2) and the problems dissapeared. > KDE is good looking and all that but is slower and consumes > more resources that AfterStep. > > Is anyone succesfully using a light windowmanager & java? Wow, I never thought of AfterStep as "light". :-) Generally speaking, you want a window manager that behaves as much as possible like mwm. I've found that a lot of the older window managers are pretty consistent (twm, gwm, and ctwm). Of course, you can always use LessTif's implementation of mwm, but I wouldn't call that "light" either. ;-) --Chris -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Java and window managers
Julio Cesar Aguilar Cabrera wrote: > > I'm using RedHat, XFree 3.3.6, and the latest IBM JDK 1.3 beta. > When I started writing visual programs in Java I noticed some > problems which I believe to be caused by AfterStep (1.8.1). > > I switched to KDE (1.1.2) and the problems dissapeared. > KDE is good looking and all that but is slower and consumes > more resources that AfterStep. > > Is anyone succesfully using a light windowmanager & java? > > Thanks. I've seen reports that Gnome/Sawfish is a big problem for Sun's JDK. I've also seen reports that Enlightenment has some issues also regarding properly placing and sizing windows. I haven't seen any problems using FVWM. I'm guessing the various development groups code and test only on their one favorite window manager, so the resulting JVM misbehaves on some others. -- Joi EllisSoftware Engineer Aravox Technologies [EMAIL PROTECTED], [EMAIL PROTECTED] No matter what we think of Linux versus FreeBSD, etc., the one thing I really like about Linux is that it has Microsoft worried. Anything that kicks a monopoly in the pants has got to be good for something. - Chris Johnson -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: error in java speech api
nilesh modi wrote: > > when i try to run a simple program of java speech api in jdk it gives error > that 'package javax.speech not found '. > do i need anything extra for running speech program , should i have speech > engine , isn't it inbuilt ? > if not, from where i can get? > from, > nilesh. > With the exception of javax.swing and javax.accessibility, just about every package that starts with javax is an extension which must be downloaded and installed separately. http://java.sun.com/products/java-media/speech/forDevelopers/jsapifaq.html#implementation -- Joi EllisSoftware Engineer Aravox Technologies [EMAIL PROTECTED], [EMAIL PROTECTED] No matter what we think of Linux versus FreeBSD, etc., the one thing I really like about Linux is that it has Microsoft worried. Anything that kicks a monopoly in the pants has got to be good for something. - Chris Johnson -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Java and window managers
--On Friday, July 28, 2000 11:56 AM -0700 Christopher Smith <[EMAIL PROTECTED]> wrote: > Generally speaking, you want a window manager that behaves as much as > possible like mwm. I've found that a lot of the older window managers are BTW, the reason for this is that the AWT makes a lot of assumptions about the window manager's behavior that are basically a lot like MWM. Perhaps the GNU Classpath version does not have this problem. Has anyone tried it? > pretty consistent (twm, gwm, and ctwm). Of course, you can always use > LessTif's implementation of mwm, but I wouldn't call that "light" either. > ;-) I think I also remember now that WindowMaker may have behaved pretty well when I used it. --Chris -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: mixing java pipes and unix-fifos?
Bruno Boettcher wrote:
>
> hello,
>
> i am in the process of porting a C++ program to java
>
> this program uses at some point unix-fifos
> is there a way to open and write/read from unix fifos out of java?
> i looked at the PipeReader etc. but this seem to be a java-intern mechanism
You bet. Here's bits of a spike I wrote a few months ago. It fires
off a child process and sends commands to it, reading the results.
The child process is a commandline shell for managing a firewall
product we sell.
One thing to keep in mind is that when unix sees a pipe, it
automatically turns on IO buffering. So, you can send a command
to your process, and your process sends it results, but the shell
buffers the results until there are 512 bytes of it to view...
So make sure your child turns off buffering specifically.
I had to make a custom verson of our command line to disable the
buffering.
(I wrote this very early in my java learning curve, so please be
gentle... I'll be rewriting this before putting it into my real
application. This was just my proof of concept.)
public Communicator(String newIpAddress) throws java.io.IOException {
ipAddress = newIpAddress;
available = 0; // number of lines ready to read
ready = false;
child = Runtime.getRuntime().exec( displayCommandBinary );
input = new InputStreamReader(child.getInputStream());
error = new InputStreamReader(child.getErrorStream());
output = new PrintWriter(child.getOutputStream());
// read the initial prompts and copyrights
while (input.ready() || ! done) {
charsRead = input.read(cbuff);
line.append(cbuff,0,charsRead);
if (cbuff[charsRead - 1] == '>') {
done = true;
}
}
temp = line.toString();
System.out.println("Initial Read:\n" + temp);
line.setLength(0);
// send the connect command
System.out.println("Sending: connect " + ipAddress);
output.println("connect " + ipAddress);
output.flush();
// read the connected message and the next prompt.
done = false;
while (input.ready() || ! done) {
charsRead = input.read(cbuff);
// System.out.println("Read " + charsRead + ": " + cbuff + '\n');
line.append(cbuff,0,charsRead);
if (cbuff[charsRead - 1] == '>') {
done = true;
}
}
System.out.println("Initial Read:\n" + line.toString());
System.out.println("Connected, I think.");
line.setLength(0);
}
public void sendCommand( String command ) throws java.io.IOException {
System.out.println("sendComand sent " + command);
output.println(command);
output.flush();
}
public boolean ready() throws java.io.IOException {
ready = input.ready();
System.out.print("Ready: ");
System.out.println(ready);
return ready;
}
public void closeConnection( ) throws java.io.IOException {
System.out.println("Closing the connection.");
output.println("QUIT");
output.flush();
System.out.println("closeConnection: " + this.getOutput());
input.close();
output.close();
error.close();
}
public String getOutput( ) throws java.io.IOException {
line.setLength(0);
done = false;
while ( input.ready() || ! done) {
charsRead = input.read(cbuff);
if (charsRead == -1) {
System.out.println("EOF from child");
done = true;
} else {
line.append(cbuff,0,charsRead);
if ( cbuff[charsRead - 1] == '>' ) {
done = true;
}
}
}
String temp = line.toString();
// chop off the last line, which is the command prompt and which does not
// end with a newline. Include the last found newline in the returned
// results.
int i = temp.lastIndexOf("\n");
temp = temp.substring(0,i+1);
line.setLength(0);
return temp;
}
--
Joi EllisSoftware Engineer
Aravox Technologies [EMAIL PROTECTED], [EMAIL PROTECTED]
No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried. Anything
that kicks a monopoly in the pants has got to be good for something.
- Chris Johnson
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Java and window managers
On Fri, 28 Jul 2000, Julio Cesar Aguilar Cabrera wrote: > Is anyone succesfully using a light windowmanager & java? windowmaker, sawmill, or blackbox are all 'light' window managers with a decent degree of usefulness. nothing beats afterstep, tho, imho, for fast, light, and feature-rich. :) -- Blue Lang Unix Systems Admin QSP, Inc., 3200 Atlantic Ave, Ste 100, Raleigh, NC, 27604 Home: 919 835 1540 Work: 919 875 6994 Fax: 919 872 4015 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Java and window managers
There used to be issues with some window managers with the Sun JDK, but Blackdown and ourselves have fixed most if not all the issues. In the next release of the 1.3 Sun JDK most of the window managers we have tried sawfish, enlightenment, fvwm, kwm, twm behave correctly (if not log a bug) regards calvin Joi Ellis wrote: > > Julio Cesar Aguilar Cabrera wrote: > > > > I'm using RedHat, XFree 3.3.6, and the latest IBM JDK 1.3 beta. > > When I started writing visual programs in Java I noticed some > > problems which I believe to be caused by AfterStep (1.8.1). > > > > I switched to KDE (1.1.2) and the problems dissapeared. > > KDE is good looking and all that but is slower and consumes > > more resources that AfterStep. > > > > Is anyone succesfully using a light windowmanager & java? > > > > Thanks. > > I've seen reports that Gnome/Sawfish is a big problem for Sun's > JDK. I've also seen reports that Enlightenment has some issues > also regarding properly placing and sizing windows. > > I haven't seen any problems using FVWM. > > I'm guessing the various development groups code and test only on > their one favorite window manager, so the resulting JVM misbehaves > on some others. > > -- > Joi EllisSoftware Engineer > Aravox Technologies [EMAIL PROTECTED], [EMAIL PROTECTED] > > No matter what we think of Linux versus FreeBSD, etc., the one thing I > really like about Linux is that it has Microsoft worried. Anything > that kicks a monopoly in the pants has got to be good for something. >- Chris Johnson > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
