32,204 Topics
| |
I have to read an Excel file and transfer the contents to the database using Java swing.The excel file contains questions for the surveys with options for answers or responses.The database should have a table say Question with columns "Question No., Question, Option 1, Option 2 and so on".I have … | |
[CODE] if (fileScan.hasNext(posPattern)) { posCB = fileScan.nextInt() + 1; for (int i = posCB; i > 0; i--) { String writeByte = fileScan.next(); BufferedWriter out = new BufferedWriter(new FileWriter("E:\\dataReadable.txt")); out.write(writeByte); out.close(); }//for } [/CODE] Using a for loop, how would I write to the file without clearing the contents, so … | |
[CODE]class Test{ static String str[]; public static void main(String args[]){ System.out.println("args "+args); System.out.println("str "+str); } }[/CODE] [U]Output[/U] args [Ljava.lang.String;@3e25a5 str null My doubt is ... How some object address is printing for args when it has not initialise. In case it has got initilised ,without array size specifiction how its … | |
Can you fix the numberformatexception [code]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Main extends JFrame implements ActionListener { int inputtedxend,inputtedyend,inputtedSAngle,inputtedarcAngle; int inputtedxpoint,inputtedypoint,inputtedx,inputtedy,inputtedwidth,inputtedheight; JLabel title=new JLabel("Choose a Grapic Method: "); String select []={"","DrawLine","DrawOval","DrawRect","DrawArc","DrawString","DrawRoundRect","fillRect","fillOval", "fillArc"}; JLabel xend=new JLabel("Enter X end point:"); JTextField inputxend=new JTextField("",5); JLabel yend=new JLabel("Enter Y end point:"); JTextField … | |
HOw can i store image in ms access database...plz suggest | |
Process p = Runtime.getRuntime().exec("C:\\tc\\bin\\" + prog_name , null); BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getInputStream())); System.out.println("Here is the standard op :\n"); s1=stdError.readLine(); i have this code can anyone tell me how to run c program using java thanks ! | |
How to create report in core java | |
Hey everyone, Just curious why my little program doesn't go through the if-statement I specified in it. [code] public static void main (String args[]){ Scanner sc = new Scanner(System.in); System.out.println("Enter a value for girls:"); int GIRLS = sc.nextInt(); System.out.println("Enter a value for boys:"); int BOYS = sc.nextInt(); if (BOYS == … | |
how todesign automatic grading system online using java i want to create one web application which creates online grading system for the students. which displays their grades,marks and ranking ... | |
discuss how java programming languagues differs from procedurals programming such as pascal and c. 1.classes 2.objects 3.attributes 4.methods 5.pirvate,protected,public 6.encapsulation 7.interface 8.inheritance 9.polymorphism | |
This simple code is showing the following error. [CODE]import java.io.IOException; import java.net.*; public class Server { public static void main(String[] args) throws IOException { DatagramSocket ds = new DatagramSocket(999, InetAddress.getByName("192.168.1.102")); ds.send(new DatagramPacket(new byte[10], 10)); } }[/CODE] Error: [CODE]Exception in thread "main" java.net.BindException: Cannot assign requested address: Cannot bind at java.net.PlainDatagramSocketImpl.bind0(Native … | |
What would be a regex pattern for the following ' and ® in Java. I have tried the following but have not been successful 1.&#[0-1][0-1][0-1] 2.&#\d\d | |
DEFINITION OF DATA REQUIREMENTS Produce an itemised consigment note for each customer including -dimension,weight and price per parcel. -total weight and price consigment -number of parcels RESIDENT DATA -up to 2kg-£7.50 -up to 4kg-£8.00 -up to 10kg-£8.55 -up to 12kg-£9.10 -up to 14kg-£9.70 -up to 16kg-£10.35 -for each extra 2kg,up … | |
Can anyone please help me! Very stuck on an assignment i need to code a java applet so that it counts the lengths of words for example i am a man would produce the output 2 - one letter words 1 - two letter word and 1 - three letter … | |
Where weight is the person’s weight in grams and height is their height in centimeters. If the result of this calculation is less that 20, then the person is medically underweight. If the result is greater than 30 then the person is medically overweight. Write a program to calculate whether … | |
Hello everyone, I have a book called "Java Genesis" and it has some files such as packages, projects and hints to enhance learning. So, I have set up a file structure in Eclipse and it shows that there are errors and warnings. When I tried running a Java Application using … | |
I am creating a program that will simulate a fish tank (got it off of google) and when I try to get the image using [CODE]mClownImage = getToolkit().getImage("Fishes/mClown.gif");[/CODE] the getToolkit() part gives me an error. it suggests that I make a method called that. I have imported java.awt.Container; which contains … | |
Hello I've made a program using JCreator. It was working fine and all of a sudden it won't run anymore. I get this message: [CODE] --------------------Configuration: <Default>-------------------- Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: … | |
I am interested in learning java online. I am looking someone who is willing to teach online. | |
Hi! I've written function that writes to one of eight files. It writes one of the strings, which is associated with a file to that file. There is also a similar one, it just reads from that file and returns it. When I run the program, it does everything correctly, … | |
Hello Im trying to code something like this [CODE] public class Decoding{ Decoding(InputStream in) //constructor Object obj = new XMLDecoder(in) } } [/CODE] [CODE] public class Test{ public static main(String[] args0){ JButton button = new JButton(); decoder = new Decoding(new FileInputStream("somtheing.xml")); button= decoder } } [/CODE] So as you see … | |
can anyone tell me how to bring jbutton within a jtable.........and how do do the actionperform of the button can i do this in jframe...... | |
Hy , I have a example tooken from the internet , and compiler gives me this error : The type CommPortIdentifier is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\ext\comm.jar The code is: [CODE]import java.awt.*; import java.io.*; import javax.comm.*; import java.util.*; /** * Open a serial port using … | |
hi All - total noob[java] here; i have an app on the android written, but i believe the question here is totally java related. after my app adds field1 + field2 + field3 and displays the value in field4, how do i *start over*? thing is, if ea field is … | |
Guys , I'm a newbie Java programmer .. 3rd year comp sci engineering student and a C++ programmer with around average programming skills I should say :D !I find it kinda weird that reading something from keyboard is such a pain in java .. Importing DataInputStream , the creating and … | |
Hey gyz, i'll like to create a java database application and wondering the best Database engine/platform to use dat'll be small, compact and easily distributed, i have sum on mind but i'm confused on the best engine that offers, quick and effective data connection, small in size. Ur advice would … | |
Im having a problem with this program why i am not able to set present total price of product if gonna seect the product form combo and the remove button cant get the selected index,retrieve the selected item and remove the selected item from the list using its index or … | |
Hi, I want to get the information from the website using HttpURLConnection.I wrote this [code]import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; public class webPractice { public static void main(String[] args) { try { URL yahoo = new URL("http://www.yahoo.com"); URLConnection yahooConnection = (URLConnection) yahoo.openConnection(); yahooConnection.connect(); long s=yahooConnection.getDate(); System.out.println("date"+(String)yahooConnection.getContent()); System.out.println("Hi"); } … | |
Great to hear that.. Java SE 7 is officially released today! After nearly five years of collaboration within the worldwide Java community, Java Platform, Standard Edition is ready for download! It's an important step in Java’s evolution. The major features of Java SE 7 are: • Project Coin- many small … |
The End.