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
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
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 =
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
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
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
-
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
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
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
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
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
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
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
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
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
[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
> > 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.
...
>> 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
> 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
> 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
[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
> 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_
22 matches
Mail list logo