32,204 Topics

Member Avatar for
Member Avatar for redmaverick

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[]) …

Member Avatar for BestJewSinceJC
0
111
Member Avatar for abhi_elementx

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 …

Member Avatar for darkagn
0
72
Member Avatar for Utter_iMADNESS

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 …

Member Avatar for darkagn
0
97
Member Avatar for silentspanky

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 …

Member Avatar for VernonDozier
0
332
Member Avatar for charlie81

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 …

Member Avatar for breandan
0
89
Member Avatar for xVent

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

Member Avatar for JamesCherrill
0
108
Member Avatar for madeindadex305

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 …

Member Avatar for Ezzaral
0
141
Member Avatar for markxchan

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?

0
46
Member Avatar for neutralfox

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 …

Member Avatar for leverin4
0
65
Member Avatar for subho07

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

Member Avatar for subho07
0
222
Member Avatar for MAJORG

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 …

Member Avatar for BestJewSinceJC
0
260
Member Avatar for neutralfox

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 …

Member Avatar for neutralfox
0
111
Member Avatar for denniskhor

Can direct convert GUI Desktop Application Netbean JAVA to .exe for use in Windows? who knw?? thanks.. tell me if impossible.

Member Avatar for peter_budo
0
156
Member Avatar for Bhoot

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 …

0
71
Member Avatar for 25kayden

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 …

Member Avatar for JamesCherrill
0
113
Member Avatar for Intrade

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 …

Member Avatar for Ezzaral
0
124
Member Avatar for gyagyus

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

Member Avatar for Ezzaral
0
83
Member Avatar for llemes4011

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 …

0
72
Member Avatar for orangejuice2005

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: …

Member Avatar for orangejuice2005
0
115
Member Avatar for doha786

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 …

0
73
Member Avatar for add4

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

Member Avatar for masijade
0
70
Member Avatar for add4

Hello there. i want to know the opened web address from my browser in java. Any one who can help me? Thanks

Member Avatar for Ezzaral
0
89
Member Avatar for javaman2

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 …

Member Avatar for darkagn
0
148
Member Avatar for jackiejoe

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, …

Member Avatar for javaAddict
0
2K
Member Avatar for doha786

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 …

Member Avatar for Ezzaral
0
195
Member Avatar for shimama

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 = …

Member Avatar for BestJewSinceJC
0
140
Member Avatar for prashant1111

i want to take input from keyboard and check which key is pressed if possible send the code. thank u.

Member Avatar for BestJewSinceJC
0
74
Member Avatar for PhiberOptik

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 …

Member Avatar for PhiberOptik
0
91
Member Avatar for lllllIllIlllI

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> …

Member Avatar for lllllIllIlllI
0
351
Member Avatar for denniskhor

[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); …

Member Avatar for denniskhor
0
117

The End.