36,051 Topics
![]() | |
I have to do a basic program of a calulator(text field at top for display and then all numbers) it does not have to be funtional. I know you can only have one layout manager per container...but I can't get it to work? This is what I have so far..any … | |
newbie taking java 1 got a question my book seems to be hiding the answer to. my project is to make a smiley face that resizes when the window changes size. my prof. gave told us that size is all relative when creating the face the circle head something along … | |
i'm write a program that asks for a password then if correct will go into a while loop, but for some reason whenever i execute the code and enter the right pass, nothing happens. heres what i've been working on: [CODE]/* This program will simulate a program that could be … | |
I need help to declare a method to determine whether an integer is a prime number using the method of public static boolear is Prime(int num) Need to find the first 1000 prime numbers and display every ten prime numbers in a row. If you can help email me at … | |
Hi, Can anyone tell me how to tweak my code so it will only generate a random number between 0 and the number input by user? Here's the code: [code] import java.util.Random; import java.io.*; public class RandomNumPicker { public static void main(String[] args)throws IOException { BufferedReader stdin = new BufferedReader … | |
My problem is that I need to make a program that has a JTextArea, a button and a JTextPane in it. The idea is to put in the JTextArea either by typing or by pasting java source code. Then press the button and out would come a colored version of … | |
I'm trying to compare a string to an ArrayList Object. But no matter how I try to compare it, such as just ==, or .equals(), or .compareTo(), or String.valueOf(ArrayList.get()) with all of the above options, it won't compare correctly, even if they are equal when outputted they aren't equal when … | |
Hi my program needs to print a text file onto the terminal one line at a time. For example if I type, "java HT head -n 7 blablah.txt" it'll print the first 7 lines and if i type "java HT head -n 3 asdf.txt" itll print the first 3 lines … | |
A part of my hw is generate a doubly linked list which has the data from an input file ("shopping.in") i am using tokenizer, but however, everytime i try to put the token into the list and print, it gives me a memory place (Dnote@1289321wutever) please help me, this is … | |
I have written this program and I have gotten the program to run but when I run the program and I try to run the input validation portion it does not go back into the loop. Also when I calculate celsius into farenheit my output comes out to 0. Is … | |
Hi everyone, I am doing a simple program with some text in the jtextpane and the text inside the jtextpane span to about three standard A4 papers. What i want to do is to only be able print even and odd pages. I am using currently the java printable interface … | |
Hi, I am looking for some code that will prompt for a number to enter so a random number can be generated from that amount. Example: The program run would look like this: " Please enter the number to pick a random number from: " Let's say we enter 100, … | |
having trouble getting this match and replace to work, im trying to just find a word and put html bold tags around it on the button click and put that text into a new jtextpane. anyone have any suggestions??? any help would be most appreciative [code] import java.awt.*; import java.awt.event.*; … | |
hi. more or less a stupid question, but anyway.. why have a 'finally' statement in java exception handling -why not just clean up in the 'catch' clause?? is it for when an exception cannot be caught?? if not, then 'finally' seems a little redundant to me.. cheers. :eek: | |
hi, my next button displays next record from the database. But after i save a record, next button don't work. Im not sure but is the next button not working because the resultSet needs to be refreshed after saving a new record? I have created the statement and resultSet in … | |
it is my first time ever learning a programming language, and I am still very confused about some things. We are using Jbuilder, and I find that I am still getting a lot of errors. i am posting this in hopes that some one can maybre give me some points … | |
Hi everyone, I have an embedded jcomponent in a jtextpane and i am trying to print the contents of the entire jtextpane to the printer i have. The program does not seem to work but if i use an embedded icon instead of an embedded jcomponent the program works fine … | |
Hi everyone, I need to ask a very generalised question. I have an embeded image in a textpane and i would like to know how to get hold of that image and store in an image variable when the user uses the mouse and highlights(selects) that particular image. I only … | |
my ap computer science assignment is basically to do the following: - Front menu gives the options to edit, save, delete, search for books (about 10 books) - In the edit menu, it gives more options to edit book title, author, and date published and save it. -delete menu lists … | |
:rolleyes: hi guys if there is any 1 out there who could just provide me with some help with java ,im in my final yr of computer science and have got to design a GUI that implements jdbc to creat an online auction system any pointers or help as to … | |
heres the problem; some one inputs a 4 digit number e.g 1234 I stored it as a string and i have to display it in a messagebox like ----------------------------- the digits are 1 2 3 4 ------------------------------------ How? p.s i know how to do trhe input box and display, but … | |
I was hoping that someone could show me how to use the equals method to change numbers that were entered. Three numbers are entered and the user is asked if they need to change a number. This is followed by a yes or no. It says if the answer is … | |
Hi, HELP. An automatic update put Internet Explorer 6 on my hard drive/WinXP. This new version of IE6 has a new security feature that blocks EVERYTHING from being downloaded from a website. Including java applets. To turn this off you have to go into control panels/internet options and add EACH … | |
okay u got me its not interesting at all but i thought if i said that more people would have a look!!!! sorry im trying to create a server that after the 10th connection of a client reads files and sends to the client, the client then sends back an … | |
I made a post about a wee and a half ago about a program I had no clue how to do. Well I worked hard at it, I'm very new to programming and I have ONE error left. I don't know where it is I have looked at it so … | |
need some help with my java code. i'm getting incompatible types error. can anyone tell me what's wrong with my code? import java.io.*; public class ifelsechain2 { public static void main(String[] args) throws java.io.IOException { String string1; int num1; InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); System.out.println("Enter … | |
I’m having problems with my do-while loops and my while loop. Also my switch statement ends and does not loop to ask for another input. I’m confused. Any suggestion that can help me or send me one the right track I would appreciate it. This is the assignment: The Miskatonic … | |
hi everyone, can anyone solve me the code for the java problem. i need a java programthat holds twenty integers in an array, loop though each cell sequentially and prints each number on the console. thank you very much. shantuli | |
hi everyone, I have a textpane using the default styled document. This textpane contains a icon and some formatted text. Next i have a file saved to my disk which is a document of another textpane. What i want to do is be able to append the two documents together … | |
Hello everyone... im very new to Java... n im doing a java program 2 read from text files... the problem is after i read the 1st line ..the 1st number will be my max value... n after i read the second lines, there will be many values input by the … | |
Hi everyone I have written an applcation and now its the step that I want to make user authorization ! but I don't know any thing about it ! if anyone knows please introduce me some articles or please guides me ! thanx for your help | |
My teacher has told me I need a build file for my networking prodject. The problem? I have NO IDEA what a build file is, let alone how to implement it. Is anyone available to step me through it? :-| | |
Hi All, I am working with Internal Frames. I used JDesktopPane and added 2 frames to it. I made one frame visible and the other was setVisible(false). This happens when I first run the program(Only first frame appearing). Now, what I want is to make the second frame visible, when … | |
hey, i'm in a high school computer science class and we're learning java..anyways, i've got this lab that i've been working on but i don't quite know how to proceed. heres a scan of the lab sheet. [IMG]http://www.bellsouthpwp.net/c/h/chungaroo/cslab%20004.jpg[/IMG] here's what i've done so far: [CODE]{public static void main (String [] … | |
Okay, I'm doing a program where a menu pops up and it deals with the roster of a basketball team. You can add, edit, delete, and view the players. All of this is working but my problem is with sorting the players. I'm using an ArrayList (ArrayList contains each player's … | |
I wanna ask .... if I want to save the content of JEditorPane or JTextPane in a file without losing the formatting ... how should I do it .... If I save it to a string ... all the formatting is lost . | |
hi all Can anyone tell me wat is Synthetic field in Java if possible send me links also thankx in advance | |
hey guys, im in ap computer science (java) and now we are doing constructors, and i am lost, i dont know how to make a constructor, i am soooo clueless, im starting to pick up but no way near close to undresstanding, can someone give me a crash course in … | |
hi all, i am a beginner in java programming.Could anyone please provide source code for the following program. A program that reads a integer and breaks it into a sequence of individual digits in reverse order.TQ. | |
Hello, I am trying to set up my website to be able to accept coupons. I am working in JSP and want to be able to get the current date and compare it to the date stored in the database. I have a field in the coupon table named 'Expiry' … | |
hey all what are pros of jdic ref avilable at java.net try this........................... | |
hi everyone, pls solve me the following problem. i need a java program that stores the following string in a two-dimensional char array : "Bell" "Dell","Hell" and "Sell".extend the programe to read the array and display each caracter in a console window. thank you. shantuli | |
I really like to play chess and thought about trying to actually make a chess game. Only im not sure were to even start. If anyone in here has ever done this can you give me some tips on how to get started and how difficult of a task this … | |
hi everyone, can anyone pls solve me the following problem. i need a java program that holds at least three records for friendsof your in memory.each record must consist of at least : a name and an e-mail address the program must also able to find each record if the … | |
Hi, ive only started to program in Java for the last couple of days. I picked up a disk containing JDK 1.3 from my uni so that I can compile programs at home. I typed up this very simple program which is shown below public class Hello { public static … | |
I don't understand how to used [B]Interfaces[/B] WindowListener and [B]Methods[/B] of it. Please for give me example. Thanks! | |
Hi Everyone, I am writing a program to convert measurements. I need the to program to have a menu. I have different units of measure to convert to one particular one. I think that I need to use a case statement. But I have no idea on how to construct … | |
Well I got the whole substring thing working.. thanks a lot. Now I've gotta struggle with the "stdin.readline()" which doesn't wanna work for some odd reason :P I imported the java.io.* i created a new BufferedReader ... and it just doesn't wanna work. Are there any other ways of getting … | |
Hi everyone, I am trying to save the entire jtable (as an object if possible) to my disk and then be able to read that same file in the same table. First there are two buttons on my frame one is "load" and the other "save as" when the save … | |
I need some help!! I need to have a user input a phone number and then spit it out using StringTokenizer. This is what I have so far: import java.util.*; import java.io.*; class Prob8_2 { public static void main (String []args)throws IOException { BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in)); … |
The End.