aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Platform dependency of AWT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Platform dependency of AWT" Watch "Platform dependency of AWT" New topic
Author

Platform dependency of AWT

Satish Kumar
Greenhorn

Joined: Mar 13, 2000
Posts: 13
Hi!
Certain classes of AWT are platform-specific unlike swings.
How is that java is said to be platform-independent.
If i write a program using AWT classes(that make use of
native code) and develop it on windows NT platform,
then is it possible to port to some other platform like
solaries,Unix..
Bye
satish
m_sat@usa.com


Satish Kumar
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20573
    ∞

You can use the same code, only the components will look different on different platforms.


permaculture Wood Burning Stoves 2.0 - 4-DVD set
Satish Kumar
Greenhorn

Joined: Mar 13, 2000
Posts: 13
Thanx a lot for ur reply.
Do u mean that if we use swings, the appearance
will be same on all platforms?
What is the difference between Portability
and Platform-independence?
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20573
    ∞

With Swing, your stuff will look more consistant between platforms. Swing is almost all lightweight components (non system dependent) and AWT is almost all heavyweight components (system dependent).
I think portability is the same as platform independence.
Satish Kumar
Greenhorn

Joined: Mar 13, 2000
Posts: 13
Hi!
Using RandomAccessFile class, we
can create a binary file. Since,
the created file,say out.txt, in
the binary format, I can't open
it in notepad and see the output.
How can I create an ASCII file?
B'cos I've developed a program for
generating prime numbers. Since,
the output is very long, I would
like to see the output later. So,
I want to store the output in an
Ascii file. How to do it?
Bye
Satish Kumar
m_sat@usa.com
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20573
    ∞

Have you tried using a Writer? As in FileWriter?
Satish Kumar
Greenhorn

Joined: Mar 13, 2000
Posts: 13
Thanx. I'll try that.
Bye
satish
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Platform dependency of AWT