32,205 Topics
| |
I am having problems reading in from a file in my project. I have a text file from which I need to read in data for creating some objects. I do not know how much data is in the file but I know the format is 6 lines of string, … | |
Hello everyone, I am a student learning Java and need some help getting text to flash or blink. The text I want to do this with is "Which Way" in my drawstring method. Any help would be much appreciated. [code] import java.awt.*; import java.awt.event.*; import java.awt.geom.GeneralPath; import java.util.Random; import java.awt.Font; … | |
I have a variable/flag in a PHP file and depending upon the value of this flag i need to execute a set of code in another .js file. Can you tell me how to access the variable in .php file inside a .js file? Please find attached the sample js … | |
What I have is a simple, convert a temperature in Fahrenheit to Celsius or in Celsius to Fahrenheit. My question: what is the best approach of implementing the while/loops so that the user enters their choice for Celsius to Fahrenheit or vice versa as many times as they want until … | |
Hello, How can I get a reference to a session? I have a page, which forms a query string, and in another page I would like to display the attributes of it. I don't want to introduce scriplets, so I am trying to do this in a pure Java file, … | |
Hi all,i need help about JTable.I'm using netbeans..I got a table contains PLU,nama,harga,qty,total..I use TableModelListener to listen to valueschanged in column..What i need help is how to create a new row if the user press enter key,and set focus to the first column of the next row..Thanks a lot..Here are … | |
I am having a problem with this code: [ICODE]import javax.sound.*; public class Sound { public static void main(String[] args) { //Code Body } }[/ICODE] The problem has nothing to do with code itself; the compiler returns this message when i try to compile: [CODE]Sound.java:1: package javax.sound does not exist import … | |
Hi I have a program that finds duplicate files and lists them in a Jtable. I have modified the default Table Renderer to change the colour of the cells but I want them to have more than two colours. Say Blue for the first set of say 5 files all … | |
Why wont this delete the files in the arraylist. i checked the arraylist and the files are there. i even added a "\\" to the files and still nothing. i dont get any errors. [code] private void fileDelte () { for (int i =0; i<Files2Delete.size(); i++) { File f = … | |
Hi all, I am learning java and have developed a very basic message app which entails having a serversocket on one pc and a socket on another. This is working fine but now i want to go further and have them both to have the abiliy to wake the other … | |
I am kind of new to JAVA and I am trying to hide a user's input (such as when the user types a password). I am not using any type of GUI just running my small programs directly in the UNIX Terminal. Is this possible to do simply, unfortunately I … | |
| |
I am having some trouble and could use some help. I need a while loo that allows for an unlimited number of employees that uses a EOF sentinal value to control the loop. heres what I have so far, any help is greatly appreciated. I really dont understand this type … | |
Write a program that simulates a small programming language (SPL) with subprograms. The language has the following EBNF: <program> ::= begin <statement> | <statement_sequence> end; <statement_sequence> ::= <statement>; <statement_sequence>; <statement> ::= <subprogram_invocation> | <other_statement> <subprogram_invocation> ::= invoke <subprogram_identifier> <other_statement> ::= increment <variable> | decrement <variable> | output <variable> | stop_sub … | |
How do you to take user input for red, green and blue(a number between 0 and 255) and make the background of the center JPanel that color. Heres the code on what ive done so far: [code] import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.border.*; /** * Write a description … | |
What are the differences between both and which one should i consider for the different kinds of java-based apps? | |
Hi i am tryin to write a recording class in java which i have done but i have to convert the recording class into a GUI i have done the coding for it but i want buttons that allows you to cyle to the nex and previous record detail if … | |
hello again every body ... [COLOR="Red"]i tried 2solveit ,but there are some problem faced me .. and i'll insert what i did .>>> This is the main class..the main problem in it how 2 print the array like the example which i show it 2 u ...[/COLOR] [CODE]import java.awt.DisplayMode; import … | |
hi guys i need help with list collection in java can somebody give me some good example of how to iterate over list, also explain little bit. Thank you | |
For learning socket programming this program is a nice tutorial , IpShower can show you a site ip adress , inform you whether you connect through a proxy server or not , if you connect a proxy , program tells you its information.Also , it can simply change the system … | |
I am going to develop a roadway traffic light simulator using java as my academic project. I have captured ideas about so from searching internets .I have to build a system which simulates a traffic network and the traffic flow is regulated using a fixed time controller first and then … | |
Dear All, I am interested to study java programming, I am collecting some sample of program. do you have a sample program of TicTacToe game? I need a sample that the tictactoe program have a function for play between server and client. The board of tictactoe will exist on them. … | |
Hello there, im doing a small program just like a packet sniffer but i have a one problem.Below are the codes which are used to list all the network interfaces and the output will be something like this: 1.Interface Name's: lo / MS TCP Loopback interface Address: 127.0.0.1 2.Interface Name's: … | |
I doing a project about Genetic Algorithm (GA). I'm looking for some book that shows GA in Java. Please advise. [COLOR="Green"]Books[/COLOR] [COLOR="Red"]Websites[/COLOR] [COLOR="Green"]Journals[/COLOR] [COLOR="Red"]White Papers/ Publications[/COLOR] | |
Hi am new at java and I was wondering what would be a code to remove it if i provide the coeff I know is -Given the index you want to remove -set the node at the previous index to point to the node at the next index -set the … | |
HELLO every one:) >> could any one help me to solve this program :icon_neutral: >> and explain it to me >> download the file bellow ....:$ | |
What is wrong with my code. it poulates the arraylist with only the filename "c:\testfile.txt" i need it to populate it with the contents of the file. [code] private ArrayList<String> Files2Delete = new ArrayList<String>(); private String fName = "c:\\TestFile.txt"; private void fileCollection () { Scanner in = new Scanner(fName); int … | |
Hello.. I need help urgently on how to save an output from the command prompt using the BufferedWriter bw= new BufferedWriter(new FileWriter(".text",true)); a little help i much appreciated and Thank you =) regards Kakashi | |
Hi, I have a class MovieRating below: [code] import java.util.*; public class MovieRating { private Map ageMap = new HashMap(); private String movieRating; public MovieRating() { ageMap.put("PG", 18); //parental Guidance ageMap.put("G", 4); //general viewing ageMap.put("A", 27); //Adult material } public String getRating() { return movieRating; } public boolean getStatus(String rating, … | |
Can someone help me modify the code below to do the following: Ensure that your mammal has a [B]private property which is an collection of limbs[/B] and [B]protected methods to add, remove and retrieve the limbs[/B]. You need to pass a limb not a list to the methods for adding … |
The End.