Greetings:
I`m starting in Java and i`m having problems with compatibility between versions, in school they have an older version(I believe its 1.4.0 but i`m not completely sure) than the one i have at home(1.5.0_04), so almost every time i try to open a applet/application at school i get errors, so i have to change some parts of code, i was wondering, is there a way to convert from newer versions to older version?, or any thoughts on how to ensure compatibility?.
for example:
At home i can use:

frame.add(X)

At school i must use:

frame.getContentPane().add(X)

At school i can`t use:

JFrame.setDefaultLookAndFeelDecorated(true);

add the compiler flags "-source 1.4 -target 1.4" (without the quotes) when compiling and your 1.5 compiler will behave like it was a 1.4 compiler and spit out classfiles for 1.4 runtimes.

Greetings:
Thanks jwenting, it worked like a charm

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.