which programming language this code is for? :S regards
BlaCk WolViX
which programming language this code is for? :S regards
BlaCk WolViX
Java is standard language .... runs on any platform therefore its code is same for windows, linux, mac, etc. This is the best feature of Java. so if u wanna java u learn java i dont think there is downside for it else its first time compilations for its code ;)
BlaCk WolViX
no problemo anytime buddy ;)
BlaCk WolViX
thanx but i figured it out alrdy :) ... i really apprecite ur help ;) but here what i got recently ... i extracted it from netbeans XD this is an example using button instead of ellipse ;)
jButton1 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT\_ON\_CLOSE);
jButton1.setText("jButton1");
jButton1.setMaximumSize(new java.awt.Dimension(73, 23));
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT\_SIZE, 400, Short.MAX\_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT\_SIZE, 300, Short.MAX\_VALUE)
);
there u go i hope u also benefited ;)
BlaCk WolViX
Hi, yep that was kinda weird or was just done for file reading. :S btw i dunno why are you using printf if you have the easier methods which are println and print :P however its ur decision but i find this is working XD anyways you can use this code: public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("Enter an integer number:\n"); int intNum = in.nextInt(); System.out.println("Enter a string:\n"); //This will only read the first string aka the first name if u wish String string1 = in.next(); //This is for the last name if you wish String string2 = in.next(); System.out.println("------------------------------"); System.out.println("Integer number: " + intNum); System.out.println("Cadena: " + string1 + " " + string2); System.out.println("------------------------------"); } } The output: init: deps-jar: compile: run: Enter an integer number: 1 Enter a string: Jassim Makki ------------------------------ Integer number: 1 Cadena: Jassim Makki ------------------------------ BUILD SUCCESSFUL (total time: 6 seconds)
BlaCk WolViX
Hi i have been searching the internet for days and couldn't find the answer .. so please bear with me ;) anyways i have been trying to solve this question .. the question goes as follow: Q: Write a program that fills the component with a large ellipse, filled with your favorite color that touches the window boundaries. The ellipse should resize itself when you resize the window. Guys all i wanna know is how to make it touch the boundaries and how to make it resize itself. Thank you.
modified on Tuesday, July 22, 2008 3:46 PM