32,205 Topics

Member Avatar for
Member Avatar for dmanw100

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

Member Avatar for BestJewSinceJC
0
117
Member Avatar for blackcloud72

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

Member Avatar for Ezzaral
0
656
Member Avatar for dinilkarun

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 …

Member Avatar for cadillacwd
0
106
Member Avatar for americaneagl

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 …

Member Avatar for BestJewSinceJC
0
308
Member Avatar for Chaster

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

Member Avatar for ~s.o.s~
0
102
Member Avatar for yonghan

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 …

Member Avatar for yonghan
0
97
Member Avatar for fireballnelson

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 …

Member Avatar for fireballnelson
0
3K
Member Avatar for Grub

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 …

Member Avatar for Grub
0
2K
Member Avatar for mrjoli021

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

Member Avatar for Ezzaral
0
230
Member Avatar for brendanmcdonagh

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 …

0
35
Member Avatar for JavaNewbieEK

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 …

Member Avatar for stultuske
0
449
Member Avatar for savinki
Member Avatar for stultuske
0
70
Member Avatar for carlcarman

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 …

Member Avatar for ~s.o.s~
0
98
Member Avatar for dimples09

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 …

Member Avatar for dickersonka
-1
100
Member Avatar for christiangirl

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 …

Member Avatar for christiangirl
0
2K
Member Avatar for ndeniche

What are the differences between both and which one should i consider for the different kinds of java-based apps?

Member Avatar for Ezzaral
0
102
Member Avatar for Taker

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 …

Member Avatar for Ezzaral
0
148
Member Avatar for bahr_alhalak

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 …

Member Avatar for dickersonka
-1
209
Member Avatar for codered152

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

Member Avatar for ~s.o.s~
0
98
Member Avatar for darthrevan

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 …

Member Avatar for stultuske
0
34
Member Avatar for bimpok

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 …

Member Avatar for stultuske
0
133
Member Avatar for ming97

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

Member Avatar for ~s.o.s~
0
99
Member Avatar for Kakashi

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

Member Avatar for masijade
0
237
Member Avatar for lordx78

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]

Member Avatar for dickersonka
0
130
Member Avatar for yawjava

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 …

Member Avatar for BestJewSinceJC
0
197
Member Avatar for bahr_alhalak

HELLO every one:) >> could any one help me to solve this program :icon_neutral: >> and explain it to me >> download the file bellow ....:$

Member Avatar for dickersonka
0
263
Member Avatar for mrjoli021

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 …

Member Avatar for dickersonka
0
94
Member Avatar for Kakashi

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

Member Avatar for peter_budo
0
101
Member Avatar for janamrob

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

Member Avatar for stultuske
0
121
Member Avatar for Achupa

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 …

Member Avatar for dickersonka
0
151

The End.