Posts
 
Reputation
Joined
Last Seen
Ranked #582
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
80% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
4
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
3 Commented Posts
~16.5K People Reached
About Me

N/A

Interests
My work!
PC Specs
Computer's config isn't important, Brain config is everything.
Favorite Tags

67 Posted Topics

Member Avatar for g.prabu

Well guys.. im new for MS SQL.. i have a solution & it worked perfectly with me. while creating table just add an extra attribute using identity keyword: [CODE]attributename int identity(1,1)[/CODE] so everytime you insert any row, it will increase 1. so there will a unique number for every row …

Member Avatar for msi
0
929
Member Avatar for panpwintlay

Hie guys! Heres something i have created to display all the prime numbers from zero up to the number entered by user. [CODE=csharp]using System; class pnumber { public static void Main() { int value; // Value Enter By User! int count,count2; // For inner & outer loop int prime; // …

Member Avatar for Momerath
-1
1K
Member Avatar for 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 for Java and two of my trainees have created "Stick Snake" and "Snake and ladders" game …

Member Avatar for Dawenlomo
0
1K
Member Avatar for Ghost

hmmm, Im 18 years old and i just purchased SCJP voucher. Im the youngest in my town. LOL :P .. just kidding. Im also interested to know, please share your experiences with us. :D

Member Avatar for hamzat1995
0
150
Member Avatar for dnmoore

Hello, try this : [CODE] double pound = .0453592; double inches = .0254; Scanner scan = new Scanner(System.in); System.out.println("Please enter in your weight: "); double weight = scan.nextDouble(); System.out.println("Please enter in your height: "); double height = scan.nextDouble(); weight *= pound; height *= inches; double BMI = weight/(height*height); //rounds the …

Member Avatar for princeandzoe
0
446
Member Avatar for bokz06

Hello, Heres another way to read the file: [CODE=java]import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; public class TestURLReading { static protected void readURL() { String u = "http://afterextratime.net/game/ita/1/Laz.txt"; URL url; InputStream is; InputStreamReader isr; BufferedReader r; String str; try { System.out.println("Reading URL: " + u); …

Member Avatar for HoRn
0
171
Member Avatar for hansino

Hello, You cant set decimal values in int type variables. You have to use double or float type. Regards,

Member Avatar for crunchie
0
237
Member Avatar for puneetkay

This program consists of a function in one class. It demonstrates the "Left To Right" Principle used by most of the languages.

0
110
Member Avatar for musi77

[QUOTE=musi77;963739]i am running this midlet on sun wireless toolkit 2.5.5. i can create many objects of same midlet from that toolkit ....[/QUOTE] 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 …

Member Avatar for harsh2327
0
124
Member Avatar for Pmarcoen

[QUOTE=Pmarcoen;962618]I seem to have a problem displaying an image from the phone's filesystem in J2ME. The following code works for images that are in the res folder but not if the path references to a file on the filesystem .. path = "file:///C:/Data/Images/200908/25082009004.jpg"; try { image = Image.createImage(path); } catch …

Member Avatar for peter_budo
0
726
Member Avatar for gunjannigam

[QUOTE=gunjannigam;962953]I want to create a custom NumberFormat which returns empty string for negative values and the double number iteslf for +ve and zero values. Please guide me....................[/QUOTE] Hello, This is for you. [CODE=java] public class CustomNumberType extends Number{ public double doubleValue() { return 0; } public float floatValue() { return …

Member Avatar for gunjannigam
0
168
Member Avatar for Dajer

[CODE] public void commandAction(Command command, Displayable displayable) { if(command==exit) { destroyApp(true); notifyDestroyed(); } else if(command==start) { try { recordstore=RecordStore.openRecordStore("My RecordStore",true); // LINE 1 } catch(Exception error) { alert=new Alert("Error Creating",error.toString(),null,AlertType.WARNING); alert.setTimeout(Alert.FOREVER); display.setCurrent(alert); } try { String outPutData[]={"Mary","Bob","Adam"}; for(int x=0;x<3;x++) { byte[] byteOutPutData=outPutData[x].getBytes(); recordstore.addRecord(byteOutPutData,0,byteOutPutData.length); } } catch(Exception error) { alert=new Alert("Error …

Member Avatar for puneetkay
0
137
Member Avatar for and12

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 get code for this program as its really common. use listFiles() method of java.io.File class to get list of all files …

Member Avatar for puneetkay
0
124
Member Avatar for llemes4011

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 drawing only within the paintComponent() method using the graphics object supplied as the argument. Hope this …

Member Avatar for llemes4011
0
796
Member Avatar for moyphus

[QUOTE=moyphus;954394]Hi To All, I have an equation in string like this ((BASIC+HRA)*(30/100)) Using replace function Now i replaced this into values... String formula = ((10000+3000)*(30/100)) whole thing as a string now 'Formula'... How can i calculate this formula float amt = formula; Now i have an error...type casting....i can't calculate …

Member Avatar for javaAddict
0
165
Member Avatar for ashish2234

A way to add rows to JTable : [CODE=java] // Header Object[] col = new Object[]{"Col1","Col2"}; // Data Object[][] data = {}; // Blank DefaultTableModel model = new DefaultTableModel(data,col); JTable table = new JTable(model); // OR table.setModel(model); // Adding Rows model.addRow(new Object[]{"Data1","Data2"}); [/CODE] Hope this will help you.

Member Avatar for puneetkay
0
134
Member Avatar for joshmo

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 y) Returns the color of a pixel at the given screen coordinates. but still it will be …

Member Avatar for Ezzaral
0
232
Member Avatar for puneetkay

Hello, I just discovered that we can use unicode anywhere in the program. EG :[CODE=java] public class CheckUnicode { public static void m\u0061in(String\u005B\u005D args) { System.out.println("Hello World!"); } } [/CODE] \u0061 = 'a' .. \u005B = '[' .. \u005D = ']' This program will execute fine without any errors. But …

Member Avatar for puneetkay
0
168
Member Avatar for weblover

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 you please post the encryption and decryption formula here ? and a test …

Member Avatar for weblover
0
100
Member Avatar for Poppystar

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 programming mistakes but the thing that matters is, you will …

Member Avatar for Poppystar
0
579
Member Avatar for JustmeVSI

[QUOTE=JustmeVSI;872324]Hi. My problem i guess it is simple but i guess I'm simple as well :). The problem is the flowing: I have a JTextFead and a search method for IDs. The IDs are 7 char long. I want to be able when the user enters 7 chars the search …

Member Avatar for JustmeVSI
0
105
Member Avatar for mostafanageeb

[QUOTE=mostafanageeb;859572]Please how to get a specified data from a file?? in java and what is the substitution of the seek function in java??? I need information Thanks[/QUOTE] Hello, Lesson : Basic I/O [url]http://java.sun.com/docs/books/tutorial/essential/io/index.html[/url] File I/O : To manipulates files. File I/O Streams : To read and write. Next time, Please …

Member Avatar for kvprajapati
0
96
Member Avatar for itslucky

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

Member Avatar for VernonDozier
0
126
Member Avatar for sandhya_r

[QUOTE=sandhya_r;858890]hi, i am useing the netbeans for the first time n i am trying to connect to a MS Access DB through the wizard but i am not able to. I entered for a DSNless connection: Name:JDBC-ODBC Bridge. Driver: sun.jdbc.odbc.JdbcOdbcDriver Database URL: jdbc:odbc: Driver={Microsoft Access Driver (.*mdb)};dbq=C:\Users\Vamsi\Documents\PIN.mdb; the issue its …

Member Avatar for kvprajapati
0
137
Member Avatar for bokz06

Hey :D [code]import javax.swing.JFrame; import javax.swing.JOptionPane; public class Demo extends JFrame { public Demo(){ setSize(500, 500); setTitle("Hello World"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setVisible(true); // This is your loop. do{ methodToCall(); }while(JOptionPane.showConfirmDialog(this, "Do you wan to play again ?") == JOptionPane.YES_OPTION); } public void methodToCall(){ // your working method. JOptionPane.showInputDialog(this,"Input numbers:"); } public static …

Member Avatar for bokz06
0
113
Member Avatar for ProgrammersTalk
Member Avatar for Ezzaral
0
602
Member Avatar for robertmacedonia

Hello, Check out java.util package. [url]http://java.sun.com/j2se/1.4.2/docs/api/java/util/package-summary.html[/url] Regards,

Member Avatar for robertmacedonia
0
99
Member Avatar for 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 tested all methods and its working perfectly. Now i have decided to make it available …

Member Avatar for puneetkay
0
173
Member Avatar for puneetkay

Hello everyone, Im back, with a new problem. LOL! I need to change Java datatypes to SQL types. I have sql queries as String object. like this one : [CODE=sql]create table MyTable ( id bigint, name String , city String , state String ) OR create table MyTable ( id …

Member Avatar for masijade
0
182
Member Avatar for caps_lock

Hello, Code is working perfectly! No NPException. Using Eclipse SDK Version: 3.4.0. Best of luck!

Member Avatar for caps_lock
0
188
Member Avatar for gauravmishra

Hello, According to me, Once you start program you have to wait for 100 secs then a JFrame will be displayed with last image only. Its because, you are using same thread to get image from Robot class with 1 second time interval. ( takeShots() method ). Do takeShots() method …

Member Avatar for puneetkay
0
165
Member Avatar for srs_grp
Member Avatar for mercury113

Hello, Heres another way to do it. [CODE=java] JComboBox[] comboList = new JComboBox[10]; // array of JComboBox type. length =10 Object[] answerList = new Object[10]; // array of Object type. length = 10, this is hold the correct answers public GUIWindow(){ // now when you create a JComboBox comboList[0] = …

Member Avatar for puneetkay
-1
79
Member Avatar for rude04

Hello, I dont think it possible to make Transparent JFrame (according to my knowledge). You can use java.awt.Window class instead of JFrame. Or you can use this trick to make it work like transparent. [CODE=java]import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.awt.image.*; public class TransparentBackground extends JComponent implements ComponentListener, WindowFocusListener, …

Member Avatar for rude04
0
210
Member Avatar for JamieC90

Hello, Use java.util.Scanner class. [url]http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html[/url] Demo Code : [CODE=java]Scanner sc = new Scanner(System.in); int i = sc.nextInt();[/CODE] Regards,

Member Avatar for javaAddict
0
218
Member Avatar for mercury113

Hello, FOR EVENTS: you can use java.awt.events.ItemListener or java.awt.events.ActionListener interfaces. TO GET SELECTED OBJECTS FRMO COMBO: you can use getSelectedItem() method to get the selected object OR getSelectedIndex() method to get index of selected object OR getSelectedObjects() method to get array of selected objects (if multiple selection is enabled). These …

Member Avatar for mercury113
0
177
Member Avatar for hany-h

Hello, [CODE] model = new DefaultTableModel(data,columnNames); model.insertRow(table.getRowCount(),new Object[] {"","","","",""}); [/CODE] When you use this code, It will create a new DefaultTableModel object and add blank row into it. But this model have NO association with table Nor Table is using this Model so row will not be added. You should …

Member Avatar for puneetkay
0
334
Member Avatar for aznlover

[QUOTE=seeker_89;772923]first set the other class as object of the main so you can call it in your main program[/QUOTE] [QUOTE=Ezzaral;772961]There is absolutely no reason to call it from main().[/QUOTE] hmm, I really cant understand whats wrong with main() method ?!?!? To aznlover, First you have to implement MouseListener interface because …

Member Avatar for puneetkay
0
227
Member Avatar for mandar2886
Member Avatar for Modo

Hello, you mean, you want to create your own relational database management system ?

Member Avatar for Ezzaral
0
127
Member Avatar for jeffreyjs

[QUOTE=jeffreyjs;766552]Hi, I am currently doing a mini project using Eclipse with Java language.. i needed to submit some values into the DB, but i am having some trouble to do so... i would like to find out if i need to create variables for all the values i want to …

Member Avatar for peter_budo
0
312
Member Avatar for javaman2

Hello, I was playing with your code and found few errors in it. I added this code of three lines: [CODE=java]System.out.println("Card Is : "+card); System.out.println("CardRank Is : "+cardRank); System.out.println("CardSuit Is : "+cardSuit);[/CODE] Outupt: [CODE] Card Is : 2 CardRank Is : 2 CardSuit Is : 0 Card 1 is a …

Member Avatar for puneetkay
0
90
Member Avatar for Blackeagle

[QUOTE=Blackeagle;770426]and i cant even post them under each other in my my post here as well. i hope u got what i'm asking for?[/QUOTE] Hello, try it like this : [CODE]"apple\t2\t22" "banana\t31\t1" "orange\t1\t3"[/CODE] escape sequence (valid ones are \b \t \n \f \r \" ' \\ ) Edited : [CODE=java]textAreaObj.setText("apple\t2\t22\nbanana\t31\t1\norange\t1\t3");[/CODE] …

Member Avatar for Blackeagle
0
104
Member Avatar for ezkonekgal

[b]Garwick's algorithm, for repacking LIFO lists stored in a contiguous block of memory, bases the allocation of remaining space upon both sharing and previous stack growth. A system whereby the weight applied to each method can be adjusted according to the current behavior of the stacks.[/b]

Member Avatar for ezkonekgal
0
218
Member Avatar for Mr.UNOwen

[QUOTE=Mr.UNOwen;765659]Well I figured out some of the issues, the only problem I'm having now is how to draw the components/background behind the button from the button component.[/QUOTE] Lesson: Performing Custom Painting [url]http://www.dil.univ-mrs.fr/~garreta/docJava/tutorial/uiswing/painting/index.html[/url] Hope this will help you!

Member Avatar for Mr.UNOwen
0
133
Member Avatar for BestJewSinceJC

Hello, I'm not sure but if you are looking for a decompiler. You can get one from here: [url]http://www.kpdus.com/jad.html[/url] I have used it for my project as i misplaced java files. :P Best of luck!

Member Avatar for BestJewSinceJC
0
132
Member Avatar for Joaoalex7

Hello, Well this code will overwrite the data in file. You don't need to delete content of files before adding new information. Also, i just tried both codes. Working perfectly! and data in both files were overwrote. Best of luck!

Member Avatar for BestJewSinceJC
0
704
Member Avatar for randomFIRE
Member Avatar for puneetkay
0
112
Member Avatar for vagas

[QUOTE=vagas;764316]How to display animations and use animation to click a menu in my application developed using java ?[/QUOTE] Are you talking about using GIF (Animation) images in application OR creating Animations in java using applets ? or .. ?

Member Avatar for puneetkay
0
60
Member Avatar for k2k

I was playing with java codes and decided to check your code. Its working fine. Its quite messy because i gave only few seconds but im sure you will get it [CODE=java]public class TestClass { int val=0; int count=0; Scanner input = new Scanner(System.in); public TestClass(){ do{ System.out.println("Choose Option (1-2-3) …

Member Avatar for puneetkay
0
316

The End.