- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
N/A
- Interests
- My work!
- PC Specs
- Computer's config isn't important, Brain config is everything.
67 Posted Topics
Re: 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 … | |
Re: 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; // … | |
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 … | |
Re: 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 | |
Re: 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 … | |
Re: 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); … | |
Re: Hello, You cant set decimal values in int type variables. You have to use double or float type. Regards, | |
This program consists of a function in one class. It demonstrates the "Left To Right" Principle used by most of the languages. | |
Re: [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 … ![]() | |
Re: [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 … | |
Re: [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 … | |
Re: [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 … | |
Re: 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 … | |
Re: 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 … | |
Re: [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 … | |
Re: 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. | |
Re: 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 … | |
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 … | |
Re: 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 … | |
Re: 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 … | |
Re: [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 … | |
Re: [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 … | |
Re: Hey, Please post your code related to problem, so we can check and help you :P Regards, | |
Re: [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 … | |
Re: 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 … | |
| |
Re: Hello, Check out java.util package. [url]http://java.sun.com/j2se/1.4.2/docs/api/java/util/package-summary.html[/url] Regards, | |
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 … | |
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 … | |
Re: Hello, Code is working perfectly! No NPException. Using Eclipse SDK Version: 3.4.0. Best of luck! | |
Re: 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 … | |
| |
Re: 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] = … | |
Re: 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, … | |
Re: 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, | |
Re: 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 … | |
Re: 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 … | |
Re: [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 … | |
Re: Hello, Try this : javac AudioConverter.java jlc.java :D | |
Re: Hello, you mean, you want to create your own relational database management system ? | |
Re: [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 … | |
Re: 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 … | |
Re: [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] … | |
Re: [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] | |
Re: [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! | |
Re: 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! | |
Re: 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! | |
| |
Re: [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 .. ? | |
Re: 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) … |
The End.