Search Results

Showing results 1 to 38 of 38
Search took 0.00 seconds.
Search: Posts Made By: Chaster ; Forum: Java and child forums
Forum: Java Sep 7th, 2009
Replies: 5
Views: 211
Posted By Chaster
1.) Default
2.) Repainted after each update
Forum: Java Sep 7th, 2009
Replies: 5
Views: 211
Posted By Chaster
It's kind of confidential. I just hoped someone came across the same issue ;). Actually it's nothing special about the code. It's not multi-threaded, I just add several entries to the list.
Forum: Java Sep 7th, 2009
Replies: 5
Views: 211
Posted By Chaster
Hello guys,

I don't really need a solution, just answer - some Swing insight. So I have a panel, and a list on it. The list is populated with strings. The problem is the following: If I add the...
Forum: Java Mar 1st, 2009
Replies: 1
Views: 352
Posted By Chaster
Hello,

In my application, as a result of P2P communication, I receive a String object, which is the serialized representation of a Hashtable. Can I somehow recover my original object? I've never...
Forum: Java Feb 18th, 2009
Replies: 3
Views: 534
Posted By Chaster
Thanks for the quick reply, however, I don't use sockets explicitly. I've been developing a P2P application using the JXTA platform. I didn't post code, since posting how I read a file's content into...
Forum: Java Feb 18th, 2009
Replies: 3
Views: 534
Posted By Chaster
Yellow,

From my application - for some reason - I am able to send messages up to only 64k. I've been wondering if it is possible to split an InputStream into partitions of 64k, and then, on client...
Forum: Java Nov 11th, 2008
Replies: 3
Views: 387
Posted By Chaster
String s = new String("");
String s1 = new String("");
System.out.println("enter String : ");
Scanner keyboard = new Scanner(System.in);

while(!s.equals("end")){
s =...
Forum: Java Nov 1st, 2008
Replies: 4
Views: 524
Posted By Chaster
well you have a few mistakes.. For ex. ageOf Interest is what? I mean is it a variable (and should be ageOfInterest)? Then, you define twice the variable trainingzone. The second one should be...
Forum: Java Oct 30th, 2008
Replies: 1
Views: 819
Posted By Chaster
Hello,

How can I get a reference to a session? I have a page, which forms a query string, and in another page I would like to display the attributes of it. I don't want to introduce scriplets, so...
Forum: Java Oct 22nd, 2008
Replies: 2
Views: 377
Posted By Chaster
I'm sure Google will help you out. Try searching for 'Power Set Java'
Why do you take OOP courses (or whatever) if you don't want to learn?
Forum: Java Oct 19th, 2008
Replies: 3
Views: 410
Posted By Chaster
Try this:
have a variable for each drink (you can have an array as well, if you want) and proceed as follows:
- when a new person comes, increment the person variable
- read their choice
- if...
Forum: Java Oct 18th, 2008
Replies: 8
Views: 1,310
Posted By Chaster
Well, if you know for sure that the license plate has the format "LLL NNN" (I mean letter by L and number by N), then you can get the integer value like this:

int anIntegerValue =...
Forum: Java Oct 18th, 2008
Replies: 4
Views: 594
Posted By Chaster
Excuse me, are you looking for ideas or complete source code??? For project themes check this out: http://mindprod.com/jgloss/jagg.html. If you want a complete project... then sorry, you won't take...
Forum: Java Oct 18th, 2008
Replies: 3
Views: 1,833
Posted By Chaster
Files in Java are usually holders of different kinds of data. Reading a text file usually means taking a piece of information out of the file. This piece of information will now be usable by your...
Forum: Java Oct 16th, 2008
Replies: 1
Views: 809
Posted By Chaster
Hi,
I have some project in which I have to deal with similar text files merging. Is there any java package for this task? If no, does anyone know how CVS (or any other version control tool) deals...
Forum: Java Sep 9th, 2008
Replies: 1
Views: 317
Posted By Chaster
Hi guys,

the thing is: suppose that there is an application (assumed that we are using Windows) waiting for some input data. This could be a password, path, search criteria (for example in the...
Forum: Java Aug 25th, 2008
Replies: 3
Views: 1,662
Posted By Chaster
Suppose you have a variable of type string. Let's apply a string tokenizer on it (contained in java.util if i'm not mistaken), with the SPACE character as delimiter. Let's have for example a variable...
Forum: Java Aug 14th, 2008
Replies: 7
Views: 648
Posted By Chaster
That's because height is an ARRAY but you here need a PRIMITIVE. You can use either a temp variable (as I described earlier), or try this: height[i] = Double.parseDouble(...);
Forum: Java Aug 14th, 2008
Replies: 7
Views: 648
Posted By Chaster
I mean:
double temp = Double.parseDouble(keyIn.readLine());

an then: height[i] = temp;
Forum: Java Aug 14th, 2008
Replies: 7
Views: 648
Posted By Chaster
You should read a value, parse it put in your array and then start over. You cannot have parsedouble[] (actually the correct version is parseDouble(args)). When you read a value, you cannot convert...
Forum: Java Aug 13th, 2008
Replies: 6
Views: 463
Posted By Chaster
public class User {

protected String userName;
protected String password;
protected String eMail;
private String aString = "I won't be inherited!!!";//It really won't

public...
Forum: Java Aug 13th, 2008
Replies: 3
Views: 463
Posted By Chaster
Dude, what is this piece of code supposed to do? By the way, first you should take a look on Java syntax. And also, start with 'Hello World' type applications to learn how to write correct, readable...
Forum: Java Aug 12th, 2008
Replies: 6
Views: 1,442
Posted By Chaster
Here is what I use:
public final class Mail {

public static final void sendMessage(String mailAddress, String text,
String subject) throws Exception
{

Properties myProperties=new...
Forum: Java Aug 12th, 2008
Replies: 2
Views: 704
Posted By Chaster
Ok, here you have two constructors, the first one (Counter()) with no parameters, and the other one: Counter(int initValue). You need constructors in creating objects. Here you could create a Counter...
Forum: Java Aug 12th, 2008
Replies: 3
Solved: JDBC, MySQL
Views: 613
Posted By Chaster
Thanks a lot, that did the trick...
Forum: Java Aug 11th, 2008
Replies: 3
Solved: JDBC, MySQL
Views: 613
Posted By Chaster
Hi everyone,

well, my problem would be:There is a database server which contains no databases. So there is nothing to connect to (as it is needed by the DriverManager.getConnection instruction). ...
Forum: Java May 31st, 2008
Replies: 3
GUI
Views: 774
Posted By Chaster
The problem is very simple, and the solution is:

Write a GUI program to compute the amount of a certificate of deposit on maturity. The sample data follows:

Amount dep: $6000.00
Years: 15...
Forum: Java Oct 21st, 2007
Replies: 3
Solved: Sql + Java
Views: 1,326
Posted By Chaster
Wow. I thought that 'set CLASSPATH=...' stuff set the variable and added the jars. So I was wrong. Please explain me detailed what should I do, becouse I'm new at this. Thanks for your patience.
Forum: Java Oct 21st, 2007
Replies: 9
Views: 1,500
Posted By Chaster
Right, my bad. I thought we had to make some stats after typing -1 (like: prime numbers were: 2,3,7). :P
Forum: Java Oct 21st, 2007
Replies: 9
Views: 1,500
Posted By Chaster
Wow man. That's piece of cake.

You'll need arrays. Declare it as private int[] array = new int[10];
In order to iterate this you need an integer. the indexing is from 0 (!!!) to that upper...
Forum: Java Oct 21st, 2007
Replies: 9
Views: 1,500
Posted By Chaster
here is a prime function:

public boolean prime(int x)
{
for (int i=2;i<x/2;i++) // actually here you can replece x/2 with square root of x
if (x % i == 0) // if you can divide...
Forum: Java Oct 21st, 2007
Replies: 9
Views: 1,500
Posted By Chaster
Please let us know what you have done so far.
Forum: Java Oct 21st, 2007
Replies: 3
Solved: Sql + Java
Views: 1,326
Posted By Chaster
Hi guys, sorry in advance for the following question:

So, I've downloaded the adequate SQL Server 2000 driver, from the Microsoft's website. I've installed it to C:\JDBC\. I've set the classpath...
Forum: Java Jun 16th, 2007
Replies: 9
Views: 3,246
Posted By Chaster
Hi!
You could define a method, let's say popUp():

private void popUp()
{
JFrame frame = new JFrame("aName");
frame.setSize(500, 500);
frame.setVisible(true);
}
Forum: Java Jun 15th, 2007
Replies: 8
Views: 2,157
Posted By Chaster
So this is a method, which calculates the percentage:

for (int i=0; i<mName.length()-1; i++)
{
for (int j=i+1; j<fName.length()-1;j++)
if (mName.charAt[i] == fName.charAt[j])
ok =...
Forum: Java Jun 15th, 2007
Replies: 8
Views: 1,370
Posted By Chaster
Ok.
I think you forgot the public keyword. Maybe you should declare your method like this:

public static String makeFullNumber(String aNumber, int aCode)
{
return aNumber + " - " + aCode;
}
Forum: Java Jun 15th, 2007
Replies: 6
Views: 1,324
Posted By Chaster
Are we talking about the "Hammurabi" (or something like that) game, when in each "year", you should ask the user how to use the grain in storage:
- How many bushels to feed the people.
- How many...
Forum: Java Jun 15th, 2007
Replies: 3
Views: 1,521
Posted By Chaster
Hi!
Try this piece of code :
ImageIcon image = new ImageIcon("ANYTHING.GIF");
If i'm not wrong you can add as image icon only GIF files, so try converting your bmp (you can find such programs on...
Showing results 1 to 38 of 38

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC