Re: i need help
wee wrote:
am a beginner programmer learning java.
There are good tutorials at Sun's website:
http://java.sun.com/docs/books/tutorial/
can anyone please help me find
or supply me with a sample source code of java wherein several layout
managers are used in one single JFrame?
public class NestedLayoutDemo {
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new NestedLayoutDemo();
}
});
}
NestedLayoutDemo() {
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(
new BoxLayout(buttonPanel, BoxLayout.PAGE_AXIS)); // ***
buttonPanel.add(new JButton("Lorem"));
buttonPanel.add(new JButton("Ipsum"));
buttonPanel.add(new JButton("Dolor"));
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new BorderLayout()); // ***
mainPanel.add(
new JLabel("Nested Layout Demo"), BorderLayout.NORTH);
mainPanel.add(new JTextArea(10, 40), BorderLayout.CENTER);
mainPanel.add(buttonPanel, BorderLayout.EAST);
JFrame f = new JFrame("NestedLayoutDemo");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.add(mainPanel);
f.pack();
f.setLocationRelativeTo(null);
f.setVisible(true);
}
}
also any tips on making a java
application run on another computer without using java webstart,
Many people would say the best tip is "Don't".
The obvious alternatives to JWS are
- Use a Java application installer. There are many.
- Distribute as a jar file for manual installation.
- Convert it to an applet (probably a bad idea).
and
lastly, where can i find compilers that convert java bytecodes into
x86 platform specific processors. thanks.. wee
The JRE does this.
However I guess you are looking for Excelsior Jet or wishing GCJ was
better than it is.
If you use Google Groups to search this newsgroup for "native binary
executable" you should find lot's of prior discussion.