Search Results

Showing results 1 to 40 of 121
Search took 0.01 seconds.
Search: Posts Made By: puneetkay
Forum: Java Sep 1st, 2009
Replies: 2
Views: 256
Posted By puneetkay
Hello,

Firstly, read the rules before you post. You should post code inside the CODE tags.

Im not sure what you mean by creating objects from toolkit, Problem could be that toolkit do not...
Forum: Java Aug 31st, 2009
Replies: 11
Views: 708
Posted By puneetkay
Firstly,

@peter_budo, Mind your language! This isnt your home street, Where you can use any cheap words.

If you read my reply with open eyes ...

"Hello,

I think the problem is... "
Forum: Java Aug 31st, 2009
Replies: 4
Views: 253
Posted By puneetkay
Hello,

This is for you.

public class CustomNumberType extends Number{

public double doubleValue() {
return 0;
}
Forum: Java Aug 31st, 2009
Replies: 11
Views: 708
Posted By puneetkay
Hello,

I think the problem is with Image path. loading image from drive isn't supported by J2ME (because theres no drives in mobile) or the image path is incorrect.

Also, theres no need to...
Forum: Java Aug 30th, 2009
Replies: 1
Views: 206
Posted By puneetkay
public void commandAction(Command command, Displayable displayable) {
if(command==exit)
{
destroyApp(true);
notifyDestroyed();
}
else...
Forum: Java Aug 29th, 2009
Replies: 1
Views: 163
Posted By puneetkay
Hello,

Study on File , ByteArrayInputStream, ByteArrayOutputStream, DataInputStream and DataOutputStream classes of java.io package. This is all you have to do. If you do a smart search, You will...
Forum: Java Aug 28th, 2009
Replies: 8
Views: 598
Posted By puneetkay
Well, Im not sure too.

Try to declare testPaint() method inside the JPanel anonymous class OR create another class that extends JPanel and override paintComponent() method.

Create object of...
Forum: Java Aug 28th, 2009
Replies: 8
Views: 598
Posted By puneetkay
Hello,

Please post the code related to the problem so we can check and help you on it.

Still...

You are using JPanel.getGraphics() to get the Graphics object to draw on. You should be...
Forum: Java Aug 21st, 2009
Replies: 6
Views: 291
Posted By puneetkay
double amt = ((10000.0+3000.0)*(30.0/100.0));
System.out.println(amt);

Working fine.

Output : 3900.0

if still not working, Please post the code related to the problem.
Forum: Java Aug 21st, 2009
Replies: 6
Views: 291
Posted By puneetkay
float amt = Float.parseFloat(formula);

and btw why are you storing equation result in string ?

better way :

float amt = ((10000+3000)*(30/100));

Regard,
Forum: Java Aug 21st, 2009
Replies: 5
Views: 804
Posted By puneetkay
Hello again,

Sorry for late reply, I was out of town.

Ok, I will be posting 3 programs in few time.
1 - Snake
2 - Snake and ladders
3 - Web browser
Forum: Java Aug 18th, 2009
Replies: 5
Views: 804
Posted By puneetkay
Greetings,

Hmm, Im not sure Is this the right place to ask this question, Well If im wrong please correct me.

Im working in a company as Java programmer that also provide professional training...
Forum: Java Aug 18th, 2009
Replies: 1
Views: 373
Posted By puneetkay
A way to add rows to JTable :


// Header
Object[] col = new Object[]{"Col1","Col2"};
// Data
Object[][] data = {}; // Blank

DefaultTableModel model = new...
Forum: Java Jun 15th, 2009
Replies: 6
Views: 585
Posted By puneetkay
Well, Im not sure what you meant by comparing images.

If you are trying to compare images based on pixels colors then you can use getPixelColor method of Robot class.

getPixelColor(int x, int...
Forum: Java Jun 15th, 2009
Replies: 8
Views: 360
Posted By puneetkay
LOL, We will need to develop a special application to read and write applications in that such way. ;)
Forum: Java Jun 15th, 2009
Replies: 8
Views: 360
Posted By puneetkay
Yes, Thats what i actually wanted to say.

Thanks for help!
Forum: Java Jun 15th, 2009
Replies: 8
Views: 360
Posted By puneetkay
Thanks for reply,
Ok, Got it.

So can we say, we use unicode in comments, method names and variable names to create a better documentation in native languages?

Or is there any other reason too...
Forum: Java Jun 15th, 2009
Replies: 8
Views: 360
Posted By puneetkay
Hello,

I just discovered that we can use unicode anywhere in the program.

EG :
public class CheckUnicode {
public static void m\u0061in(String\u005B\u005D args) {...
Forum: Java May 20th, 2009
Replies: 2
Views: 153
Posted By puneetkay
Hello,

Key event will work fine from my point of view.

On every key event you can check if the length of value in JTextField is equal to 7.

Example :
if(jTextBoxObj.getText().length() ==...
Forum: Java May 20th, 2009
Replies: 11
Views: 739
Posted By puneetkay
lol, Its ok, I will be glad to help you. :D

Regards,
Forum: Java May 20th, 2009
Replies: 11
Views: 739
Posted By puneetkay
Hello again,

Its really simple, Just write a if statement inside the loop to check (p[i] == ' ') . If the condition returns true then skip that char and set encryptedtext variable to ' ' (SPACE)...
Forum: Java May 18th, 2009
Replies: 7
Views: 713
Posted By puneetkay
Hello,

Firstly, Please post your code inside the [ CODE ] [ / CODE] tag.

There are many problems with your code and you really need to do hard work on it.

Its not a big deal to solve your...
Forum: Java May 18th, 2009
Replies: 2
Views: 1,336
Posted By puneetkay
Hello,

Heres another way to read the file:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import...
Forum: Java May 18th, 2009
Replies: 11
Views: 739
Posted By puneetkay
Hey again,

Ok, got you. First of all, 7 + 5 = 12 so it should be 'M' LOL :P

Here the solution, Change the formulas to :

Encryption : 65+(((int)e[i]-65) + key)%26
Decryption :...
Forum: Java May 17th, 2009
Replies: 11
Views: 739
Posted By puneetkay
Hey again,

I got the answer. Word that you want to encrypt must be entered in UPPERCASE.

Or if you dont want to restrict user to enter word in only uppercase, then use toUpperCase() method (on...
Forum: Java May 17th, 2009
Replies: 11
Views: 739
Posted By puneetkay
Hello,

I think, the problem is in the encryption and decryption formula. I tried to find it out by googling on it. But i didn't get anything related to the formula that you are using.

So can...
Forum: Java May 1st, 2009
Replies: 2
Views: 241
Posted By puneetkay
Hello,

Lesson : Basic I/O
http://java.sun.com/docs/books/tutorial/essential/io/index.html

File I/O : To manipulates files.
File I/O Streams : To read and write.

Next time, Please do good...
Forum: Java May 1st, 2009
Replies: 3
Views: 237
Posted By puneetkay
Hey,

Please post your code related to problem, so we can check and help you :P

Regards,
Forum: Java Apr 30th, 2009
Replies: 3
Views: 836
Posted By puneetkay
Hey Sandhya,

Im not sure about NetBeans because i never tried it.

About connecting to MS Access using DSN. Then the default username and password is blank, But if you want there should be some...
Forum: Java Apr 30th, 2009
Replies: 9
Views: 302
Posted By puneetkay
hey sorry my mistake :P

do{

doCalculate();

}while(JOptionPane.showInputDialog(null,"Do you want to play again ? (y/n)").equalsIgnoreCase("Y"));

tested and working...
Forum: Java Apr 30th, 2009
Replies: 9
Views: 302
Posted By puneetkay
hey again,

change the loop in main method to :
do{

doCalculate();

}while(JOptionPane.showInputDialog(null,"Do you want to play again ? (y/n)").toUpperCase() == "Y");

If y...
Forum: Java Apr 30th, 2009
Replies: 9
Views: 302
Posted By puneetkay
hey again,

check now..
/**
* Write a description of class sqaurerootCube here.
*
* @author (your name)
* @version (a version number or a date)
*/
Forum: Java Apr 30th, 2009
Replies: 9
Views: 302
Posted By puneetkay
Hey :D

import javax.swing.JFrame;
import javax.swing.JOptionPane;


public class Demo extends JFrame {

public Demo(){
Forum: Java Apr 29th, 2009
Replies: 0
Views: 941
Posted By puneetkay
This program consists of a function in one class. It demonstrates the "Left To Right" Principle used by most of the languages.
Forum: Java Jan 25th, 2009
Replies: 4
Solved: Trees
Views: 432
Posted By puneetkay
Hello,

Check out java.util package.

http://java.sun.com/j2se/1.4.2/docs/api/java/util/package-summary.html

Regards,
Forum: Java Jan 25th, 2009
Replies: 2
Views: 407
Posted By puneetkay
Hie verruckt24,

Yes, even i have used Hibernate many times.

Now im working on supporting Blob/Clob and supporting multiple collections.

Let me explain, Where i actually need help:
...
Forum: Java Jan 24th, 2009
Replies: 2
Views: 407
Posted By puneetkay
Hello Everyone,

Few days ago, There was active thread on creating own DBMS in Java. Its not an easy task so i decided to create Object-Relational Mapping Framework and i have done so.

I have...
Forum: Java Jan 20th, 2009
Replies: 9
Views: 489
Posted By puneetkay
Yes, I don't think there's any other way to do it.

Im going to create Mapping class for it.

Anyways, Thanks for help! :D
Forum: Java Jan 19th, 2009
Replies: 9
Views: 489
Posted By puneetkay
Hello,

I need to create tables based on Dataobjects classes.

EG : I have class named Student with 3 attributes
-----------------------
| Student
-----------------------
| int Id
| String...
Forum: Java Jan 19th, 2009
Replies: 9
Views: 489
Posted By puneetkay
Thanks for reply!
But i didn't really get you.

Here are the few details:
Using Eclipse SDK 3.4.0
Driver : MySQL Java Connector 3.1.4 Beta Library.
Server : MySQL 5.0.3 Win32 Installer
...
Showing results 1 to 40 of 121

 


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

©2003 - 2009 DaniWeb® LLC