35,586 Topics

Member Avatar for
Member Avatar for tenlrt

Hi, An urgent help is required. I need to display colored font in command prompt during execution of a java program on Windows Machine. I am unable to do so and while I searched for online help I came across JANSI library. Is there any other simpler and better way …

Member Avatar for Slimmy
0
129
Member Avatar for codybuRr

Hey All! New to here, but I have a couple questions: How do I find Average word length, and how to I printout the occurrence of each word size? Needs to look like this: [CODE]length frequency ------ --------- 1 3 2 13 3 24 4 13 5 10 6 2 …

Member Avatar for codybuRr
0
1K
Member Avatar for morrisproject

I am trying to use javascript to validate text boxes on my form. I am currently using this code: [CODE]<script type="text/javascript"> function validate_form (){ var myTextField = document.getElementById('Motor_Temperature'); if(myTextField.value == "") alert("Please fill in Motor Temperature") return false;} else { return true; } </script> </head>[/CODE] But i keep getting an …

Member Avatar for jmichae3
0
146
Member Avatar for siva28

Can you please tell us, free gold and silver rate service provider for RSS . And also give whether casting service provider RSS feed.. need java script above mentioned or XML file.

-1
82
Member Avatar for TigerTeck

Directions...Write a program SumOfOdds that has one main method that asks the user to input two odd integers where the first is smaller than the second. The program ouputs the sum of all the odd integers from the smaller output to the larger output. You must use a while loop …

Member Avatar for TigerTeck
0
112
Member Avatar for Nandomo

I am writing a program that gives and grades a test. Currently I am working on reading in the text from a file to administer the test, but am running into limitations. So I have a couple of questions. Is there any way I can read in a segment of …

Member Avatar for Nandomo
0
197
Member Avatar for Nandomo

I made an arraylist of objects which contain a question and an answer... How can I display just the question? Sooooo confused. Tutorials or anything will help, thanks in advance. [CODE] /* text file */ T Which Java keyword is used to define a subclass? extends S What is the …

Member Avatar for Nandomo
0
180
Member Avatar for akaicewolf

Ok so I am writing this GUI menu and one of the choices on the menu requires the user to log in. So I open a new window that prompts the user for a username password. However after the user inputs the information how do I just close the window? …

Member Avatar for hfx642
0
288
Member Avatar for federerforehand

[ICODE]import java.util.Random; public class Card { public String cardGeneration() { Random generator = new Random(); int x; // random integer representing suit int y; // random integer for card value String mysuit, mynumber; //assigning names, these will be changed int suits = 4, numbers = 13; //depending what card is …

Member Avatar for hfx642
0
192
Member Avatar for lele07060

can someone help me and tell me what is wrong, I can't figure it out. This is what it is exactly saying Lab424.java:14: cannot find symbol symbol : method printf(java.lang.String, float) location: class Lab424 printf(" sum %f\n", sum); it is pointing to the "p" [CODE]import java.util.Scanner; public class Lab424 { …

Member Avatar for JamesCherrill
0
522
Member Avatar for eLu-sive

hi, am working on a bigger project than this, only using this as an example because i do not want to waste a lot of your time. i have this code, its supposed to write to the database, but have no idea as to what i should put under action= …

0
86
Member Avatar for skywire_

Hello, I was tasked to make a program that reads data from a text file and then place it into a JTable. I managed to read the file and split the strings but I don't know how to put the strings into a format accepted by JTable. Please help. This …

Member Avatar for mKorbel
0
2K
Member Avatar for domingur

This is my project and I have the code below.....Create a class that simulates the functionality of a simple car. You can do simple things like drive, add gas and honk the horn. Simple text messages are displayed on the screen for feedback when appropriate and ALWAYS include the make …

Member Avatar for JeffGrigg
0
698
Member Avatar for Erlendftw

Is there an actionMap-like thing for mouse clicks? Thank you in advance, ive tried google, but did not find anything :/

Member Avatar for Erlendftw
0
206
Member Avatar for jjemphoung

I am currently doing some writings to an excel file (.xls) through JExcel API. My problem is about the autoSize method of CellView. My code. [CODE] public void write() throws IOException, WriteException { File file = new File(inputFile); WorkbookSettings wbSettings = new WorkbookSettings(); wbSettings.setLocale(new Locale("en", "EN")); WritableWorkbook workbook = Workbook.createWorkbook(file, …

0
157
Member Avatar for lele07060

can someone help me and tell me what is wrong, I can't figure it out. It is pointing to the line "public class Lab4.24" [CODE]import java.util.Scanner; public class Lab4.24 { public static void main(String[] args) { int i; float sum; i=3; sum=0; while(i<=99) { sum=sum + ( (i-2)/i); i=i+2; } …

Member Avatar for JeffGrigg
0
80
Member Avatar for sha11e

I downloaded mysql-connector-java-5.1.18 and put it on my USB drive. I brought my USB drive to school and opened up Eclipse, in there I added an external .jar (the mysql-connector-java-5.1.18.jar). Then I wrote this java code: [CODE] import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.Scanner; public class Main …

Member Avatar for ~s.o.s~
0
208
Member Avatar for GeekDude

Hi JavaGeeks, i am trying to get context path of my Applcation. But it is showing errors in that. Can you please mention the way how to get context path in javascript functions.

Member Avatar for Troy III
0
5K
Member Avatar for spades0001

Hey guys! I'm trying to make a GUI program. The program can take a picture from the computer, then the user can tag certain areas and input names. When the user hovers over the area where he/she tagged, it would show the name of the person tagged. And also, the …

Member Avatar for JamesCherrill
0
99
Member Avatar for 54uydf

Hi, I'm seriously guessing here, but since I've seen that some php websites contain java stuff, like a java chatroom, I wonder if I can find a better solution adding some java to my php code. I'm looking for a way to browse and select a folder, or allow the …

Member Avatar for 54uydf
0
175
Member Avatar for slasherpunk

So I know of two methods of reading or writing files in java. The first is the read(byte[]) method provided by InputStream class. The second is the readLine or write() method provide by the Buffered prototype. Which is the more efficient one out of these? Which one would you recommend?

Member Avatar for JamesCherrill
0
153
Member Avatar for ITHope

So my java pprgram is actually a GUI I did all of it except I cant figure out how to convert between bases example: number=2239 base=3 newbase=4 first i need to convert 2239 to base 3 which would be 2 * 3^3 + 2* 3^2 + ..... then convert that …

Member Avatar for JeffGrigg
0
110
Member Avatar for asmsycool

Hi, i've a problem with my codes, when ever i run it, i got an error from the checking i implemented. Can some pls explain why does the error keep coming. [CODE]import java.net.*; import java.io.*; public class EchoClient{ static final int serverPort = 1026; static final int packetSize = 1024; …

Member Avatar for JamesCherrill
0
442
Member Avatar for iThaos

Hello fellow developers, Let me just start by saying I have had an abnormal start to developing. I started first with HTML > PHP > Java. I don't have much experience with Java but I feel quite confident in making PHP applications. I have already searched the forums but nobody …

Member Avatar for iThaos
0
144
Member Avatar for rushi3311

As we know [LIST] [*]ServletContext [*]HttpSession [*]HttpServletRequest [/LIST] are interface in JSP SERVLET api of Java..! We repeatedly use it in our code for different purposes, but i am still confused where and in which class all abstract method for given interfaces are implemented ? Like setAttribute, getAttribute , removeAttribute …

Member Avatar for JamesCherrill
0
162
Member Avatar for rushi3311

[CODE]RequestDispature red = request.getRequestDispature("xyz"); red.forward(req,res);[/CODE] in this simple example RequestDispature is INTERFACE..! "red" is reference for that , but whose instance it actually holds ??? "forward" and "include" methods are of RequestDispature interface...but where they are implemented ??? in which class ?? which class implement this interface ??? Can anyone …

Member Avatar for JamesCherrill
0
216
Member Avatar for Kayla1809

Modify the Inventory Program to include an Add button, a Delete button, and a Modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock, and the price of each unit. An item added to …

Member Avatar for mKorbel
0
96
Member Avatar for federerforehand

I got dinged points for these: Instructor wants 1. The class is divided into multiple methods, mentioned a Constructor instead? 2. The toString method is included in the Card class to return the face and suit. What did I do wrong? How do I fix it? I am pretty lost …

Member Avatar for adarshcu
0
136
Member Avatar for Daigan

Hi, so I'm new with Java and the programming thing. Here's my problem. I need to do an errortrap without using a loop and creating a method solely for errortrapping so I figured i need to use try and catch statements but I'm not sure how. Basically my problem is …

Member Avatar for Daigan
0
122
Member Avatar for shenanigans902

Hi, I keep getting the error message "Missing return statement" after my if else controls. I have return controls, I'm just not sure if I can implement multiple returns. For example, I am trying to create a method in which the middle value of a sequence of numbers is returned, …

Member Avatar for thines01
0
1K

The End.