use if else statements in printMatrix() method
Example: if(yourBoolean)...;else...;
read Control Flow Statements (The Java™ Tutorials > Learning the Java Language > Language Basics)
The while...
Type: Posts; User: serdar
use if else statements in printMatrix() method
Example: if(yourBoolean)...;else...;
read Control Flow Statements (The Java™ Tutorials > Learning the Java Language > Language Basics)
The while...
you have used two Scanner objects and second object has only one character read from first object it doesn't have 3 characters
to resolve your problem use just first object when calling...
your loop doesn't loop even one times you think that it loops twice because you used "do while" and you used two Input JOptionpanes.
while(compWin > 2 || userWin > 2)
means loop until compWin or...
I compiled your code and it is working.
restart your IDE
sometimes helps!
give a backgroud color to differ your panels.
you have 2 errors
* your driver is wrong
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
Connection c= DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver...
to change background image you should have
*array with image names on ImageTest class
*setImg() method on ImagePanel class
* I'm using ImageHelper.class to load Images
*counter to go to next...
Dear Junky
I think you have to read posts more carefully before abuse at smb. hurl
text = textInput.getText();
String array[]=text.split(" ");
int counter=0;
...
I think you have to read more tutorials about statements
use else if statement instead of second if
after posting this thread I asked this question to my other friends and one of them told that it is possible by add() method
I tried it and it works
import java.awt.*;
import javax.swing.*;
...
each key has different Key Code for example space is 32
you should add KeyListener to your component
and the you can check which key is pressed like
if(event.getKeyCode()==32)
Hello
I'm trying to add JButton into JTextField like in the image below is it possible or not
and is it possible to do like that in JTable cell ...
I'm new to reporting in java and I tried to create report with JasperReport lib by IReport
i created simple report on ireport but i don't know how to use it in app
I have searched through google...
hello !
I created simple Java ee application using File >>New Project >> Java EE >>Enterprise Application in Netbeans 7.0 using Glassfish server 3.x but when i tried to run application I had this...
call next() instead of nextLine()
My JVM using UTF-8 encoding
Hello Everybody
I'm using MySQL and I created database with UTF8_general_ci format
My problem is when I 'm inserting data from My Application and then retrieve data it looks like "?a?"
...
I got Exception when I tried to add 100000 records into JTable by using DefaultTableModel
what I have to use to fix this problem
I'm using MS ACCESS 2003 database in my application but I can't set encoding unicode to UTF8
thanks
I think the best way to print panel is by using J2PrinterWorks library
I have used it and I liked it
I think only applets can be added to web application
<P>
<APPLET codebase="yourApplicationFolder" code="yourMainClass.class" width=350 height=200></APPLET>
</P>
or if you want to add applet...
first declare your getStick() method as public and static then you can call that method like chopStick.getStick();
change only 1 line
package test;
import java.io.*;
public class Methods{
public static void main(String args []) throws IOException{
InputStreamReader instream = new...
I think you have to do like this
edited by moderator
How to add mysql and jre into my java installer so that it check if a target computer has that programs and then install if necessary
hello everybody