35,618 Topics

Member Avatar for
Member Avatar for hatebin

Hello. My code describes Color classes: [CODE] abstract class Color{ private final int H=45; private int V; private int S; Color(int V,int S){ this.V=V; this.S=S; } public int getV(){ return V; } public int getS(){ return S; } public void setV(int V){ this.V=V; } abstract void print(); } class Black …

Member Avatar for hatebin
0
81
Member Avatar for vivin.bharathi

Hi, I am a java learner, i have installed netbeans 7.0 and i have also installed the glassfish server, but there is no database options available , please provide me help how to install the java database in netbeans Regards, Bharathi

Member Avatar for dantinkakkar
0
87
Member Avatar for reen

import java.util.Scanner; public class sfera { public static void main(String[] args) { //Langkah 1:Baca input dari pengguna System.out.print("Masukkan nilai jejari: "); Scanner input = new Scanner(System.in); final double PI = 3.14159; double jejari = input.nextDouble(); double luas; double isipadu; //Langkah 2: kira luas luas = 4 * PI * jejari …

Member Avatar for nandosss
0
217
Member Avatar for javaprog200

Hello, When I run the following program, the applet window displays nothing. I will be grateful for any help. [CODE] import javax.swing.*; import java.awt.*; public class BoxPanel extends JPanel { private JTextField label1, label2; public BoxPanel() { setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); label1 = new JTextField(20); label2 = new JTextField(20); add(label1); add(label2); …

Member Avatar for NormR1
0
143
Member Avatar for MrHardRock

Hey I have an assignment to get a number from the user and print it as a string with commas in the correct space. For example if the number is 13904 it should read 13,904 or 1005 should read 1,005. I have to do this recursively. Working on my pseudo-code …

Member Avatar for dantinkakkar
0
2K
Member Avatar for Glass_Joe

[ATTACH=RIGHT]16645[/ATTACH]Oracle announced Thursday evening (August 12) that they would be filing a lawsuit against Google, claiming that their Android phone software infringes upon patents and copyrights of their Java software, which they acquired when they purchased Sun Microsystems in January for $7.4 billion. "In developing Android, Google knowingly, directly and …

Member Avatar for dantinkakkar
5
417
Member Avatar for xcrypted1

Evening all, My assignment is as follows: Consider a program that administers multiple-choice quizzes. The student needs to provide a response such as A or D. Your job will be to check for input errors in the student response string. Check that the string has length 1, and that it …

Member Avatar for stultuske
0
199
Member Avatar for jackbauer24

My ten year old has learnt quite a lot of java and wants a few BEGINNER projects. Any ideas?

Member Avatar for zeroliken
0
307
Member Avatar for ForceStr

I want to add a progressBar (just to show that something is happening) when the database rows are fed into a table. First I tried to create a frame, where I added progressBar. I called frame.visible in the while loop which populates the table with database datas. But the frame …

Member Avatar for dantinkakkar
0
1K
Member Avatar for mcz2012

I have a simple program with a potential complicated output (see below). I am asked to make a simple for loop that displays results in GUI. Can I do this without with showmessagedialog instead of doing a JTextbox/label ect? I need this: sample gui output: After year 1 $11000 After …

Member Avatar for dantinkakkar
0
127
Member Avatar for bhallarahul

i want to use use javamail Api and i am not able to understand which server i use or is there is any other api available which is better then javamail Api.please suggest me

Member Avatar for bhallarahul
0
147
Member Avatar for lbgladson

I have the following code which allows a user to play Rock, Paper, Scissors with the computer. The code allows for 10 rounds and counts the number of wins and ties. I need to allow for user misspelling by allowing the input to be accepted if the user types the …

Member Avatar for stultuske
0
192
Member Avatar for frivolous

ASALAM-O-ALIKUM i want to read a mp3 file in java and shows the data on console output. i can read header data but i dont need it. i want a ACCURATE DATA FROM WHICH I CAN EXTRACT SUCH A FEATURE which tells the mood of song i.e sad, happy, romantic …

Member Avatar for dantinkakkar
0
81
Member Avatar for Vladnaka

Hello, everybody, I am doing my Java homework and we used this line in class with no problems at, I have the code from the program we used in class and it works on my computer no problem. However, when I put it into my homework's code, it gives me …

Member Avatar for crimsondawn
0
875
Member Avatar for jazzermonty

Hi folks. I'm new here so appologies if I'm not posting in the correct place. Here's my issue. I want to paint independent graphics on the same JPanel. I thought that I could create a method that paints my image(s) then call this in the constructor, but not sure what …

Member Avatar for ztini
0
148
Member Avatar for abraham Nkomo

Hi to everyone l have this assignment to do: Synchronize access to the instance variable, accBalance. Because accBalance is a double and not an object, it cannot be used as the monitor. Use synchronized methods or synchronized blocks of code, as appropriate. Simultaniously test two threads. Because the threads can …

Member Avatar for NormR1
0
90
Member Avatar for slasherpunk

I'm trying to run a simple servlet that counts the number of times a user visits the page using cookies but I'm getting the following error. I thought that NullPointerException was because there were no cookies at all in the browser. But after checking I found a couple of cookies …

Member Avatar for NormR1
0
331
Member Avatar for kyriacos1986

I want to update a record of a gym member when his/her weight change. But unfortunately my program can't find the given member. Here is my code: [CODE] public static void updateWeight() { Scanner in = new Scanner(System.in); // Creation of a new Scanner object String tempName = ""; // …

Member Avatar for kyriacos1986
0
137
Member Avatar for FUTURECompEng

Hi, I created a game in which players take turns entering their symbol by clicking on a box that is implemented on a grid window. I am having a hard time being able to check if the player has four symbols in a row diagonal or up or down or …

Member Avatar for FALL3N
0
297
Member Avatar for learntosucceed

I'm noob at GUI Swing. I have 2 questions. 1)I'm trying to implement a program that reads a text file, so I can use it to add multiple tabs to the program based on the amount of data in the text file. For example, text file have 3 names. I …

Member Avatar for nandosss
0
2K
Member Avatar for bhallarahul

hi everyone you guys helped me many time this time again i need your help Actually i want to learn struts frame work and i read the content of 2-3 sites but i m not able to learn how to run my first simple application. Can any one help me …

Member Avatar for bhallarahul
0
132
Member Avatar for mits28

I want to count the total no of rows in a table [CODE] Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:gabbar"); Statement ps1 = con.createStatement(); ResultSet count = ps1.executeQuery("SELECT COUNT (*) FROM products ); //products is a table in database [/CODE] count is of ResultSet type.but i want to do arithmetic operation on …

Member Avatar for stultuske
0
457
Member Avatar for dantinkakkar

I want to build a network protocol analyzer, but I really don't know where to start. Obviously, I don't want the code in hand, I can think it up myself -- but the problem is a little more specific - where do I look at to get the IPs passing …

Member Avatar for dantinkakkar
0
287
Member Avatar for shean1488

Hi everybody. I'm working on my program. And have this output storred in the object puzzle: [CODE]Puzzle is: 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 16 2 6 10 14 3 7 11 15 4 8 12 16 5 9 13 1 …

Member Avatar for DavidKroukamp
0
310
Member Avatar for Stjerne

Hi guys, So I'm doing an assignment right now. One of the tasks is about listing files. It wants you to insert a name, either directory or a certain file, and give you a message with some informations. So I'm trying to finish the part where I enter a directory …

Member Avatar for stultuske
0
181
Member Avatar for dantinkakkar

The problem is, that I want to read data and analyze it from a promiscuous network device programmatically using java. Using existing software like WireShark/DarkStat is NOT a solution. I wanna do it myself. Any hints on where do I start?

0
82
Member Avatar for sha11e

What I want to do is 1. Take strings from the user and store it in a vector<string> 2. Loop through each string, typing each letter of the string How would I go about doing this? Robot r = new Robot(); [CODE]char letter = 'a'; r.keyPress( (int) letter )[/CODE] Won't …

Member Avatar for stultuske
0
3K
Member Avatar for dantinkakkar

Alright, so I tried to write a little short guide on Object Input and Output to files, since the worst situation one can find themselves is being unable to serialize files in a proper and readable format. One way to do so is to create an object of a class …

0
80
Member Avatar for wallet123

hi, our final exam will be on next week, i want our program to be different may i ask how to put colors on texts of JOptionPane on the background and how to change font size and style and how to put sound effects.. please make it easy to understand …

Member Avatar for wallet123
0
86
Member Avatar for shaan_046

Error :: org.springframework.web.servlet.DispatcherServlet noHandlerFound I am attaching all the relevant files. Please help..?? web.xml [CODE] <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <servlet> <servlet-name>loginSer</servlet-name> <servlet-class> MyPackage.LoginServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>loginSer</servlet-name> <url-pattern>/LoginServlet.do</url-pattern> </servlet-mapping> <servlet> <servlet-name>Timeserv</servlet-name> <servlet-class> MyPackage.TimeServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>Timeserv</servlet-name> <url-pattern>/timeservlet</url-pattern> </servlet-mapping> <servlet> <servlet-name>filter</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> …

0
96

The End.