32,204 Topics
| |
Hi! this is a lengthy post/I hope its comprehensible basically this program should calculate and display the area of a circle.....but it shows area as 0.0 for every value of radius entered.......I would really appreciate it if someone helps! [CODE]import java.util.Scanner; public class circledriver { public static void main(String args[]) … | |
Hi folks, I want to write grammar rules for a form entry application. On the form/frame I have some fields: Customer name, telephone number I check the validity of the textfileds before data saved. What can be the grammar for a telephone number and name considering that users shud not … | |
Hello. Is there a way to get my program to read the next line from a file based on a condition? Let's say my file has lines with 1s and 0s, I need it so that it continues reading the line if it reads 0 until it reaches a 1 … | |
Bellow are 2 files for Pie, First is simple. It works but needs PieJavaPizza to have shown inputs. For slice and type. Radius is always a power of 2. And I am stuck. Is it possible to make import java.io.BufferedReader; import java.io.InputStreamReader; import java.text.DecimalFormat; import java.text.NumberFormat; Work with objects in … | |
I want to change a while loop to a for loop but not sure how to do it. This is the loop. [CODE][LIST=1] [*]public static void main(String[] args) [*] { [*] String input = JOptionPane.showInputDialog( [*] "Please enter a number, 0 to quit:"); [*] int n = Integer.parseInt(input); [*] int … | |
Hello to all , i have my project ... but how can i make it executable and give it to other people so they can run it ? It has GUI as well .. not a simple dos prog Thanks | |
Let's assume that your classes are working, and you have created an "A" object, and added 4 boxes. (5 x 5, 4 x 10, 2 x 4, and 6 x 12). Now choose the method for displaying all the box sizes. The following text might be displayed: box: 5 x … | |
I'm trying to use JSR-75 with a mobile phone project. I added the libraries to the project, but whenever I compile and run I get: [B]Error preverifying class com.ibm.oti.connection.file.Connection[/B] Can anyone tell me what is wrong so that it compiles and works well? | |
Hello friends, I am currently developing a chat application and I am having a small problem. When the user send a message, the message appears in a text area, like in MSN and when the user receives a message the message again appears in the text area, its just a … | |
i want to display data from a table using jTable in swing.how can i increase the text fields....kindly can anyone give me some codes | |
I can't seem to compile this properly. I'm having a lot of trouble. Can someone help me please? I have netbeans and Jarmaker. Anyone? [CODE]import java.io.*; import java.net.HttpURLConnection; import java.net.URL; import java.util.Enumeration; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; public class Update extends Thread { public static void main(String args[]) { new Update((new … | |
Hello everyone, I am having a small problem, does someone know how to break a long string into small groups of 3 characters. I've tried it but its not working. Here's a sample of my code: [code] int begindex =0, endindex = 3; String plaintext = null; String block; StringBuffer … | |
Can direct convert GUI Desktop Application Netbean JAVA to .exe for use in Windows? who knw?? thanks.. tell me if impossible. | |
I have written the following java applet code, mainly with the aim of suspending a thread instead of nullifying it and creating an another instance of it. I want to know if the below written code is safe, or, in other way, good code to follow? [CODE] public class AppletThread … | |
Here are the errors I am getting, but I can't figure it out. Please help: GUI.java: 10: illegal start of expression public GUI(MovieCollection i) { ^ GUI.java: 110: illegal start of expression private javax.swing.JButton extButton; ^ GUI.java:111: illegal start of expression private javax.swing.JTextArea text Area; Here is my program: //GUI.java … | |
Why is it that when I attempt to repaint the entire Applet, the screen flashes (as if the repaint requests are slowed down due to many details being painted all at once), whereas a repaint to a JPanel added to the ContentPane of the JRootPane doesn't flash at all? Then … | |
Hi, I try to use this function and although I have imported javax.swing.JComponent, the compiler does not recognize it ("cannot find symbol method paintImmediately(int,int,int,int)"). Any help would be greatly appreciated, gyagyus | |
I wrote a level-editor for a game that I wrote, and I need to save the image on the screen to a file so i don't draw a bunch of tiles to the screen each frame. I have no idea how to save it. I could just screenshot it and … | |
Am working on a big project and am at a particular point within it that requires me to do a couple of things with an array: Array size [1048] 1)How would I break up an array into 10 sections and further divide those sections into 100 spaces u know like: … | |
i have code to find next string after a particular string that shows result correctly.. right now i want to make an array to show the list of my output's name. [CODE] FileReader fr; BufferedReader br; String result=""; String word= new String(); String target = "friend"; try{ //read large text … | |
Hello there, I wrote a program in java and i make it jar. it works its task; But a user can terminate(Kill) my program by task manager. What can i do to prevent my procee in runnig? Need Your help... Thanks | |
Hello there. i want to know the opened web address from my browser in java. Any one who can help me? Thanks | |
hey again i hate to be a bother but i still can't get this to work my driver program(the second code) won't call the add method or the minus method to subtract input i tried to do this in my code below and have failed if you have any suggestions … | |
Having a problem with getting my array into a TextArea, I originally wanted to use a JTable but found the Table Model and what to do too difficult for what I want so my question is I have my array and now I want to display it inside a TextArea, … | |
i m very new in java. now facing prob to get char/string after a particular string from txt file. suppose i have few text files in one folder and every txt files contain some line like my first friend jocky, second friend vicky and so on.....:$ my program should open … | |
Trying to read a file from the user that contains numbers which i use to calculate avgs, range, number of #'s and so on. I can't get it to work tho. Any critiques and help would be much appreciated. Thanks much double grade; //variable for entered grades double sum = … | |
i want to take input from keyboard and check which key is pressed if possible send the code. thank u. | |
I guys, I am working on a program that does remote desktoping and I am finding the biggest issue is that most people have routers which block most ports. What port do you recommend to create the least amount of difficulties with routers. (This program will be used for technically … | |
Hi I have a sorting applet that implements Bubble Sort and Insertion sort, and i have a couple of classes in my program. I made it using netbeans and i have no main class, and when i run it using this code: [code] <html> <applet code=Sorter.class width=800 height=300> </applet> </html> … | |
[CODE]{ String readPOS; readPOS = jTextArea1.getText(); String []POS; POS = readPOS.split("[-.!? ]"); jTextArea2.append("Part of Speech Result:\n"); String patternKGN,patternKPF,patternKK,patternKNA,patternKPA, patternKPC,patternKPK,patternKS; for(int i = 0; i < POS.length; i++) { try { File readKGN = new File("KGNLibrary.txt"); FileReader outKGN = new FileReader(readKGN); char[] buf = new char[(int)readKGN.length()]; outKGN.read(buf); patternKGN = new String(buf); … |
The End.