Re: Printing with 1.2

1999-11-12 Thread Pavel Tolkachev
Hi Greg, See this two articles on Sun's site: http://developer.java.sun.com/developer/technicalArticles/Printing/Java2DPrinting/index.html, http://developer.java.sun.com/developer/technicalArticles/Printing/SwingPrinting/index.html You may need to register as Java Developer (it is free) to read

Re: Still looking for a solution.

1999-10-21 Thread Pavel Tolkachev
Dear Wayne, Wayne wrote: ... > Can someone tell me why this doesn't when I have the button. Also how > can I get > this to work without putting a handler on the button? ... I suppose this is because frame dispatches keyboard event to the lowest component that has keyboard focus in its Component

Re: EventListener

1999-08-23 Thread Pavel Tolkachev
One way is to store your frame somewhere in your MIActionListener. With minimum changes in your code you can write like this menulistener.addActionListener(new MIActionListener(this)); class MIActionListener implements ActionListener{ Frame f; MIActionListener(Frame f) { this.f =

Re: Frame Layout

1999-08-16 Thread Pavel Tolkachev
Hi all, With Window, you can do almost all you can do with Frames, but, in spite of Frames, Windows do not appear at the taskbar (at least on Windows systems, I suppose for X Window managers similar behaviour can be observed). IMHO the better AWT design would be to allow to select this behavior a

Re: final variables in constructors

1999-07-15 Thread Pavel Tolkachev
The answer is: according the JLF, superclass constructor is called *before* any initialization statement in subclass. super() does not actually run in aClass() but java compiler generates method where it is called before first initialization statement of aClass. The syntax super(...) is allowed o

Re: indeo avi module & rtf-reader for java-linux?

1999-05-27 Thread Pavel Tolkachev
Bruno Boettcher wrote: > 2. question didn't found anything in java to display rtf format, maybe > somebody could redirect me in the right direction? This should surely exist... Swing javax.swing.text package includes RTF support. I am not sure whether it is full enough though. Pavel -

[Slightly off-topic] Re: How to make a system call in Java

1999-05-13 Thread Pavel Tolkachev
Chris Abbey wrote: ... > *note: Process.waitFor() has some ugly problems (on all platforms) > with never returning your call ...It seemed to be a problem also when I played with this (using JPython, not java directly, though). But then I discovered this was my lack: I must empty both Output a

Re: A bug(?) report

1999-05-07 Thread Pavel Tolkachev
Topi Maenpaa wrote: > > I have noticed some things that do not seem to work right in your current JDK1.2 > release for Linux. The reason why I consider these bugs is that the same things > work on Sun's implementation. > > 1. Is there a problem with the ActionListeners? I have noticed that som

Re: Problems appending to a file

1999-04-28 Thread Pavel Tolkachev
The problem is not with FileOutputStreams but with ObjectOutputStream(f). ObjectOutputStream is the consistent database and it must be written and read entirely 'in one eat'. This does not mean you cannot save two ObjectStreams to one file, but it is up to you to divide your file to the 2 relevant

Re: Line numbers vs Compiled Code in stack traces

1999-04-19 Thread Pavel Tolkachev
Michael Nielsen wrote: > > dan wrote: > > > > Try running with the "-nojit" option. Turning off the JIT allows the exception > > stack trace to display line numbers. > > Where, I tried java -nojit in 1.2, but it complains that no such option. > > mvh > mike. > The following options

java-linux@java.blackdown.org

1999-01-18 Thread Pavel Tolkachev
Javasoft have not decide yet whether it is lawful to distribute Windows L&F on non-windows environment. To stay on safe side they embedded the function public boolean isSupportedLookAndFeel() into all LookAndFeels. For WindowsLookAndFeel it looks like: public boolean isSupportedLookAndFeel

Re: Is this a JVM bug? Why is my local variable not initialized?

1999-01-06 Thread Pavel Tolkachev
This is expected behavior. The following is an excerpt from "The Java Language Specification", sectoion 12.5 (Creation of New Class Instances): cut here- 1.Assign the arguments for the constructor to newly created parameter variables for this constructor invocation. 2.If this construct

Re: Request For OS Sys Props [was Re: Reading (All) EnvVar

1998-12-16 Thread Pavel Tolkachev
Yes I do not mind, I even like programs writing their settings in such a way. Windows NT keeps the whole its registry in memory (based on my experience with it I even suspect that it keeps it intentionally in *physical* memory for some strange reasons). Image that you have 100 programs installed o

Re: Request For OS Sys Props [was Re: Reading (All) EnvVars ]

1998-12-16 Thread Pavel Tolkachev
Well, First of all this is information you asked for. os.name= Windows NT os.arch= x86 os.version = 4.0 Then, why do you think this practice (with directories in user.home started from .) is bad on WIN32? Yes, files started from '.' are visible in explorer, so what? Sun's Workshop and

Re: Reading (All) Environment Variables in W95/NT

1998-12-14 Thread Pavel Tolkachev
Try something like this in your NT/95 startup script (smth like this must work also on linux/bash with changing \ to /, %% to $, del to rm and doing smth with :s and ;s in multiple paths in environment): set >%TMP%\env java -Denv.file=%TMP%\env ... del %TMP%\env and then in your code: Properties

Re: swing-1.1beta3

1998-12-03 Thread Pavel Tolkachev
[EMAIL PROTECTED] wrote: > > I'm having some problems to install swing-1.1beta3 on RH5.2. > > 1. I installed jdk in /java/jdk117_v1a/ > 2. I downloaded swing11-beta3.tar.z into /java > 3. tar xvzf swing11-beta3.tar.z created directory /java/swing-1.1beta3 + 60 > html files own by user uucp and

Re: Using "setSize" with a Frame.

1998-11-29 Thread Pavel Tolkachev
> > It opens a frame with the size 1100x100. > You and I should read more closely. 1100x100 works correctly here. 100x100 doesn't. It's expected behavior of java. First time 'releasing' window or other native component you indirectly call Component.addNotify() that adds native peer to component.

Re: Deprecated `Thread.stop()' in forthcoming JDK 1.2. Why?

1998-11-24 Thread Pavel Tolkachev
... >> My > >common sense tells me: there is no way to stop thread "in correct > >manner" if it has no provisions for this. InputStream makes you to poll > >available() function for non-blocking read. Probably my testing code > >will give you some assistance in your problem: > > It is hard to hav

Re: Deprecated `Thread.stop()' in forthcoming JDK 1.2. Why?

1998-11-23 Thread Pavel Tolkachev
> Right. Sleeping and blocking I/O are interrupted by the interrupt > mechanism; when this happens, the I/O methods and the sleep method > throw an appropriate exception that tells you it is interrupted. I/O methods do not throw, at least not on NT Sun's JDKs and API documentation does not state

Re: Basic installation. Please Help.

1998-11-17 Thread Pavel Tolkachev
> IMO, the cross-platform capabilities of java are seriously hurt by all the hoops > that end-users have to jump through (setting up classpaths, .sh/.bat files, etc) > just to get someone elses application to run. Admittedly, java installshield and > the like do do a good job of setting this stuff

Re: Deprecated `Thread.stop()' in forthcoming JDK 1.2. Wh

1998-11-13 Thread Pavel Tolkachev
[EMAIL PROTECTED] wrote: ... > Class.forName( "org.blackdown.jdbc.AnyOldDriver" ); > Connection con = DriverManager.getConnection( url, username, password ); > Statement stmt = con.createStatement( "select * from JDK_RELEASES" ); > > stmt.executeQuery(); // One

Re: Deprecated `Thread.stop()' in forthcoming JDK 1.2. Why?

1998-11-13 Thread Pavel Tolkachev
> I read somewhere that Thread.stop() is now deprecated. Yes, and it's very good. > Now how on earth do we stop a thread ? Just allow it to exit from its run() method. Try to use this pattern: pattern is (run() can be in Thread subclass or in Thread Runnable)) private boolean runEnabled_