Showing results 1 to 40 of 500
Search took 0.04 seconds.
Posts Made By: javaAddict
Forum: Java 14 Hours Ago
Replies: 11
Views: 188
Posted By javaAddict
Re: Display how sort works? Please help

Applets are not my strong point.
But I advised you to use a JTextArea and display in each line the elements of the array.
Check the API of JTextArea on how to append and set text
Forum: Java 14 Hours Ago
Replies: 11
Views: 188
Posted By javaAddict
Re: Display how sort works? Please help

You don't say what doesn't work and what errors you get.

Also it would be a good idea to print the values in 1 line:

for (int scan = index+1; scan < numbers.length; scan++){
if...
Forum: Java 16 Hours Ago
Replies: 20
Views: 188
Posted By javaAddict
Re: Java newbie needs help with arrays

Can you again post the code, the error, and the commands you are using to compile and run
Forum: Java 17 Hours Ago
Replies: 20
Views: 188
Posted By javaAddict
Re: Java newbie needs help with arrays

I run the program and it works ok.
Forum: Java 17 Hours Ago
Replies: 20
Views: 188
Posted By javaAddict
Re: Java newbie needs help with arrays

The post at the top of this forum should get you started.

Also I didn't see a question in your post. What do you expect us to do for you?
Forum: Java 21 Hours Ago
Replies: 11
Views: 188
Posted By javaAddict
Re: Display how sort works? Please help

You can create an array with some numbers inside.
>Then print its values,
>Call the sort method
>Print again the values.

Also if you want to see how the sort progresses you can change the methods...
Forum: Java 21 Hours Ago
Replies: 5
Views: 88
Posted By javaAddict
Re: loop

I don't believe that this is correct:
boolean true = keyboard.next();
because you can't give your variables names like: true which is a keyword for java.

I was thinking something...
Forum: Java 1 Day Ago
Replies: 5
Views: 88
Posted By javaAddict
Re: loop

This forum is full of examples on how to read input from the keyboard.
Do a little search.

Also check the classes:

Scanner
BufferedReader
Forum: Java 1 Day Ago
Replies: 5
Views: 88
Posted By javaAddict
Re: loop

boolean stop = false;

while (!stop) {

//code to be repeated


//ask user if he/she wants to stop
if yes stop = true;
}
Forum: Java 1 Day Ago
Replies: 2
Views: 63
Posted By javaAddict
Re: help

First of all don't put a 'throws' at the main.
Second of all the error is very easy to figure out. Check your notes on how to write and run a simple program.
Forum: Java 1 Day Ago
Replies: 1
Views: 71
Posted By javaAddict
Re: Determine instance

Check this link on how to determine what kind of class is an instance:

http://en.wikibooks.org/wiki/Java_Programming/Keywords/instanceof
Forum: Java 2 Days Ago
Replies: 2
Views: 75
Posted By javaAddict
Re: arrays

Because when you do this:

String [][] array2D = new String[5][];


You don't create a 2-D array, but an 1-D array that takes as 'elements' arrays. So you can do this:


array2D[0] = new...
Forum: Java 3 Days Ago
Replies: 5
Views: 116
Posted By javaAddict
Re: About setBLOb & getBlob

Like I said I have never used them but you could check out the API:

Blob (http://java.sun.com/javase/6/docs/api/java/sql/Blob.html)
SerialBlob...
Forum: Java 3 Days Ago
Replies: 5
Views: 116
Posted By javaAddict
Re: About setBLOb & getBlob

I have never used these objects before but I can tell you that you get the exception because you don't instantiate the 'msg' object:

Blob msg; <-- it is null so when you write...
Forum: Java 3 Days Ago
Replies: 3
Views: 118
Posted By javaAddict
Re: Need Help in Connecting MySQL Database to JTable

The driver you are using, seems to be correct.

Have you tried this:
Go to Project Properties > Java Build Path > Libraries. and add the mysql connectivity jar ?

Also can you try to add...
Forum: JSP 3 Days Ago
Replies: 5
Views: 162
Posted By javaAddict
Re: Create Dynamic Hyperlink

One more thing that I forgot to add in the example.
If you want the HTML to create a link like this:

<a href="viewdata.jsp?value1=John">John</a>

The jsp should be:

<a href="viewdata.jsp?value1=<%=...
Forum: JSP 3 Days Ago
Replies: 5
Views: 162
Posted By javaAddict
Re: Create Dynamic Hyperlink

Also when you write something outside the <% %> it is displayed the way you write (HTML style).

So when you write this:

<a href="viewdata.jsp?value1="+sth+">"+ . . .

It will not concat. It is not...
Forum: Java 3 Days Ago
Replies: 11
Views: 188
Posted By javaAddict
Re: Display how sort works? Please help

What do you mean when you say:
I have to show 2 sorts insertion, and selection sorts demonstration in bars.

What is this bars?
Forum: Java 4 Days Ago
Replies: 7
Views: 135
Posted By javaAddict
Re: How to.. "access-back" class members?

Also a second example:


class FrameMaster extends JFrame {
Frame1 frame1;
Frame2 frame2;

// create somehow the 2 frames
public FrameMaster() {
frame1 = new Frame1(this);
Forum: Java 4 Days Ago
Replies: 7
Views: 135
Posted By javaAddict
Re: How to.. "access-back" class members?

Version1:

class Frame1 extends JFrame {

public Frame1() {

}

private void methodClose1_Open2() {
this.setVisible(false);
Forum: Java 4 Days Ago
Replies: 7
Views: 135
Posted By javaAddict
Re: How to.. "access-back" class members?

What exactly are you trying to accomplish?
Forum: Java 4 Days Ago
Replies: 7
Views: 135
Posted By javaAddict
Re: How to.. "access-back" class members?

I got it. Here is the thing. The error you get is this:



If I remember correctly it usually happens when you run out of memory due some "endless loop" thing. Please someone correct me if I am...
Forum: Java 4 Days Ago
Replies: 18
Views: 418
Posted By javaAddict
Re: database in java

Also it is best/common practice to have the attributes start with lower case:


private String achterNaam;

public String getAchterNaam() {
return achterNaam;
}

public void setAchterNaam(String...
Forum: Java 5 Days Ago
Replies: 2
Views: 99
Posted By javaAddict
Re: why long variable is taking integer value?

Try this: Integer (http://java.sun.com/javase/6/docs/api/java/lang/Integer.html)

int is 'smaller' than long so it can fit inside a long. If you write this:
double d = 1;
wouldn't be correct? But it...
Forum: JSP 6 Days Ago
Replies: 2
Views: 183
Posted By javaAddict
Re: new line '\n'

I don't know if it will work, but try to replace the char: '\n' which is in the String with this: <br>
Forum: Java 8 Days Ago
Replies: 5
Views: 163
Posted By javaAddict
Re: Inheritance

You say:
> we don't have a multiple inheritance
but then you ask:>in which function we use these inheritance

The only thing I can say is that java doesn't have multiple class inheritance, but...
Forum: Java 8 Days Ago
Replies: 12
Views: 296
Posted By javaAddict
Re: java app with INSERT statement...

Probably the number of values you are using are not the same with the number of columns you have in your query.
Pay more attention to puneetkay's post.
Also try posting the query you are trying to run
Forum: Java 13 Days Ago
Replies: 6
Views: 245
Posted By javaAddict
Re: please help me to submit my minipro

Apparently by the time you read this, you should have delivered your project.

But just for you to know your above pots doesn't make any sense. We are all willing to help, but you didn't ask any...
Forum: Java 13 Days Ago
Replies: 37
Views: 745
Posted By javaAddict
Re: Need help with starting this code

num5 = num1.subtract( num2 );


Also when you create your class and declare the private variables, you will need to implement the methods described.
Example, with the above you will have a public...
Forum: Java 16 Days Ago
Replies: 7
Views: 288
Posted By javaAddict
Re: Hi My dear friends, Pls help me

First of all, you didn't post a question, and second there is a link at the top of the forum created just for you:

http://www.daniweb.com/forums/thread99132.html
Forum: Java 18 Days Ago
Replies: 13
Views: 422
Posted By javaAddict
Re: Sudoku Logic

This is the same solution as my first.
Instead of an [9][9][9] array which would mean as you said an array [9][9] with each cell having an array with numbers and after a number is used...
Forum: Java 18 Days Ago
Replies: 13
Views: 422
Posted By javaAddict
Re: Sudoku Logic

I had an idea once of how to do this but I didn't like it very much.
Here is what I have thought:

Each cell (81 cells) will be represented by a Vector (perhaps an array [9][9] of Vectors). Each...
Forum: Java 19 Days Ago
Replies: 7
Views: 263
Posted By javaAddict
Re: Problem with Arrays

In your code you say:

static class GameButton extends JButton{
int value = 0;
}


So why value wouldn't be zero?
Forum: Java 20 Days Ago
Replies: 2
Views: 215
Posted By javaAddict
Re: Need Help With My Main Method Code

I don't want to sound ignorant, or pretend that I know everything, but does this code make any sense to you all?
Because if the purpose of the code is reading a specific file then I don't think this...
Forum: Java 20 Days Ago
Replies: 11
Views: 953
Posted By javaAddict
Re: java projects for students

This is a java forum for experienced developers to help others to learn and understand.
You think that we are stupid or incapable of writing CORRECT code and selling it?
Forum: Java 20 Days Ago
Replies: 11
Views: 953
Posted By javaAddict
Re: java projects for students

The 10000 is it in US Dollars or in Euros?:)
Because I don't think that any student (school or college) will be willing to pay that kind of money
Forum: Java 20 Days Ago
Replies: 7
Views: 263
Posted By javaAddict
Re: Problem with Arrays

Why did you create 2 entirely identically posts?

http://www.daniweb.com/forums/thread162997.html
Forum: Java 20 Days Ago
Replies: 7
Views: 263
Posted By javaAddict
Re: Problem with Arrays

You create a new NOT null ARRAY that holds GameButton elements:
grid = new GameButton[1];

grid is an ARRAY.

But:
grid[0] is a BUTTON and you never instantiate it.

So the answer to your problem is...
Forum: Java 21 Days Ago
Replies: 12
Views: 385
Posted By javaAddict
Re: Palindromes

First of all:
Next time post what kind of error you get and where you get it so we wouldn't have to search the entire code for the error.

And second:

This:

public static boolean isPalindrome(s)...
Forum: Java 21 Days Ago
Replies: 11
Views: 388
Posted By javaAddict
Re: textfiles

First of all I think you need to remove the 'comma'

String[] fileList = {...
Showing results 1 to 40 of 500

 
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:00 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC