36,051 Topics
![]() | |
Hello everyone, I am designing one website in which I want to build one chatting application. My problem is in which technology chat application will be develop like jsp, servlet and spring and how to start to develop chat application. I heard about RMI so using RMI it is possible … | |
I have everything added to the JFrame using absolute positioning. It works fine but when it repaints the pie chart it also repaints the last JNumericField and button at the the very top left of the screen. At postion 0, 0 I presume PieChartFrame.java import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; … | |
I am working on a java application that will display an image and play a sound. It finds the current month and displays the appropriate information. Below is the code that I have been testing (that's why santa is in april) it will not work when trying to play wav … | |
I have Oracle 8i installed in my PC And i Installed NetBeans7.0rc2 with glassfish server It shows an error that the glassfish server cannot be started SEVERE: Shutting down v3 due to startup exception : No free port within range: 8080=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@187955b i want to chnage the default port number 8080 … | |
m trying to connect my project wid oracle db ..wts wrong wid dis code yr....:( <%@page import="java.sql.ResultSet"%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@ page import ="java.io.*"%> <%@ page import ="javax.servlet.*"%> <%@ page import ="javax.servlet.http.*"%> <%@ page import ="java.sql.*"%> <%@ page import="java.sql.*" %> <html> <head> <title>db</title> </head> <body> <% try{ System.out.println("hi"); Class.forName("oracle.jdbc.OracleDriver"); Connection … | |
HI, i want to store the text present in the text area in ms access database when user clicks submit button.....i am using macromedia dreamweaver..........pls kindly help me for doing this............ | |
java have any default function to use UPGMA.like Math.pow(x,2) | |
How can i find the Euclidean distance of 2D matrix in java.is it possible like Math.pow(x,2) | |
Is as way test out swing components without having to rely on Thread.sleep() to make sure that the components have realized completely. This problem with this approach is that it becomes difficult to guess how long it would take for components to realize under different environments of execution like vnc … | |
Hey all, I'm working on a login screen and have an MSAccess database that stores the userName and password. I am currently using JtextField and String to access the username and password located in the MSAccess database, but now I want to hide the password when it is being typed … | |
can anyone see my error? error output error: ';' expected System.out.println((GoldFish)owner.pets[ 9 ]).getAction("*Rat eats alot*" )); ^ owner.pets[ 9 ] = new GoldFish(); Pet BlackMoor = owner.pets[ 9 ]; System.out.println((GoldFish)owner.pets[ 9 ]).getAction("*Rat eats alot*" )); ![]() | |
Hi All can you pleased help me how to resolve applet load fail in IT link applet loading fine, but when i used same code and made a local setup while runnning applet is not loading please see the stack trace and com.scand.jtree classes are exists under applet folder under … | |
I need to develop a program in Java which will launch an integrated or USB webcam and capture a video recording for a specified time....i looked through the net, but I couldn't get the code to work...I have the JMF files....can anyone please tell me how its done, or if … | |
I am trying to use Java to detect signals from the serial port sent from an IR circuit. When the IR circuit detects an obstacle, it gives an output of 0 volts and otherwise the output is 5 volts. Can I read these voltage differences directly on the PC using … | |
Hi, Im been working with a project now, and have got stuck. Cant see what im doing wrong. Im supposed to make a Digital Thermometer. Right now im stuck on passing values from one class to another, been trying to use get methods.It seems like the value I get is … | |
I know this seems to be a very basic questions but still want to clear my basic knowledge so i am asking this question What is String Pool in java? what is difference between String var="DANIWEB; and String var =new String("DANIWEB"); | |
how can i use the matlab(matlab function) into java | |
![]() | `Inline Code Example Here` class MainMenu extends JPanel { public MainMenu() { this.setLayout(null); JButton newGame = new JButton("New Game"); JButton loadGame = new JButton("Load Game"); JButton scoreGame = new JButton("High Score"); JButton exitGame = new JButton("Exit Game"); this.add(newGame); newGame.setBackground(Color.white); newGame.setPreferredSize(new Dimension(180, 50)); newGame.setFont(new Font("Fixedsys", 1, 25)); this.add(loadGame); loadGame.setBackground(Color.white); loadGame.setPreferredSize(new Dimension(180, … |
I am making a java gui keyboard as practice The keyboard itself works well and is made out of JButtons It changes colors when a certain key is pressed and then releseased I have two questions: Is there a simple way to listen for tab being pressed? Is there a … | |
Hello. I'm new to Java. I created 4 CHOICE that has 9 numbers. It should convert the selected item into words in the text area. I don't have any idea how to do it. Please Help. Here's my code. import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; public class Final1 … | |
Hi, Basically im looking to create a simple application that takes in an instruction from the console. The instruction includes the width and length of a grid (x,y), the starting location of a car (x,y on grid), and the instruction to move about on the grid. Essentially an instruction shall … | |
How do you wrap code in tags. This OP had a problem doing it: See http://www.daniweb.com/software-development/java/threads/418944/choice-and-text-area-convert-number-to-word `String var = null; forIint i etc // end` | |
I have a question. How can I run a process while a timer is running in the program. Here's a sample layout of what I mean. Or is it possible to have this kind of layout?  I have already the timer method. | |
My only issue here is i am not able to invoke line 41 owner.pets[ 3 ].getAction();? Any ideas why? `Inline Code Example Here` abstract class Pet1 { abstract void perform(); } class Dog extends Pet { void perform() { System.out.println("*The dog rolls over*"); } } class GoldFish extends Pet{ void … | |
![]() | The following is my RDF file structure. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > <rdf:Description rdf:about="http://www.wordpress.com/blogs/ckj"> <rdf:subject>Data structures</rdf:subject> <rdf:object>vijayalakshmi</rdf:object> <rdf:value>kjhjk</rdf:value> </rdf:Description> </rdf:RDF> I want to write a piece of java code that can * read the value of <rdf:subject> <rdf:object> into a model inside a java program. How should I do this?? I am … |
![]() | I am cresting a digital clock and I am having troubles updating the interface please can someone help me with this. I have the code below: ********/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package Interface; /** * * … |
Hi My issue is i cant get the arrys correct,with abstract class.Can some one highlight to me the error in class Example1.I want to create 2 extra pets (iguana & hamster) but i am getting it wrong. below are the errors from my complier 23.java:37: error: constructor GoldFish in class … | |
hi, i read through a few website ,gone through a few examplebut i am still getting 01 error in my code? Error message: goldFish.java:11: error: cannot find symbol void perform(){System.out.printIn(this.action); ^ symbol: method printIn(String) location: variable out of type PrintStream 1 error abstract class Pet { abstract void perform(); } … | |
I made a custom JTextField that only accepts numbers into the textfield. I used insertString to do this. Tt works pretty well except it allows oddly only the letter e. It accept e only after a number is inputted first. And once e has been entered the textfield does not … | |
Hello, I am writing a simple program for my Java class and I keep getting this annoying error that after reading the code over and over again, I just can't see where the error is originating from. Anything obvious sticking out? Here is the error: Exception in thread "main" java.util.InputMismatchException … | |
hi all , I develpoed java application i java swingss, I need tocreate two versions linced version and trail version, Trail version should experied in 20 days,once user gives the serieal key the application shold work , where shold I store registration key, How could I protect my application could … | |
Hi all, I have a slight problem when checking if a "Token" is in my StringTokenizer string. My code: import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.lang.String.*; import java.util.*; public class TextAnalyser { public static void main( String args ) { StringTokenizer stringTokenizer = new StringTokenizer("You are tokenizing string"); System.out.println("The … | |
Okay, I am going to go through ALL my steps thus far just so that this process can be sped up hopefully. I have done this before, but it was awhile back and I forgot how, but I know it is possible. 1. I made a Neatbeans created Java Application. … | |
hello everyone, I am developing an application for my project... My application works correctly when I run it on applet viewer...But when i try to run it with the help of html page ..the code does not run and gives an erron java.security.accessdenied exception.... Actually i have loaded an image … | |
As I mentioned in an earlier post of mine that I have my computer exam on th 26th March 2012.. So I was just wondering if anyone could provide me with some programming questions for my school level which I could practice on my own. If anyone is posting me … | |
**Hey, Hi all! I'm a bachelor student, new to Java. Following code is giving error in PrintDetails() What parameters should I define in it?? Kindly check and tag out my mistakes in the following code.. Thanks ^_^** class student { String a;String b;char c;double d; student(String name,String rollno,char gender,double gpa) … | |
Could anyone tell where is the error in the program? There is a compile-time error... When I hit compile it shows error in the 40th line saying that 'r' might not have been initialised.. I can't get that.. Pease could anybody help?? import java.util.Scanner; public class Customer_Account { public static … | |
![]() | I need to take arguments and change the extensio of the file for writting but I get java.lang.ArrayIndexOutOfBoundsException: 1 Why? Is there any better way? // change file name for saving the output file int dot = inputFile.lastIndexOf('.'); // check for the dot String baseName = (dot == -1) ? … ![]() |
Open the project space in greenfoot and study the codes of the classes Space and Asteroid. 2. Modify the constructor so that the space world paints 300 stars. To paint a star you write the following code: GreenfootImage star = getBackground(); star.setColor(Color.WHITE); star.drawOval(50,50,2,2); this will draw a small white star … | |
Hi. I have problem adding text box after each label ID Code, Weight, Rate, Price Charge, it does not show when i run the code. Also, how do i add the $ sign when display the price charge. the ouput should be like this: Fee Calculator ID Code: [Text Box] … | |
Hey, all I'm working on a homework assignment which includes the creation of an insertion sort method to go through an Array List of basketball games. The basketball games are formatted: public Game (String homeTeam, int htScore, String opponent, int oppScore) { this.homeTeam = homeTeam; this.htScore = htScore; this.opponent = … | |
I'm developing an Intrusion Detection System program....right now, I have written some of the code, but I'm having a lot of difficulty testing it, because I don't have any virus infected systems to test the code on....is there any way I can develop a worm just for testing purposes?...or is … | |
Hello, I am trying to create images from files in a Java ME program, but sometimes the Image.createImage("filename") is returning null without throwing an exception. It works fine for some images but not for others. I've even renamed a non-working image to the same path as a working one, and … | |
hi, I installed NetBeans IDE 7.0 but when I tried run it this message keeps on appearing"see no.1." I tried to uninstall it but an error message also pops-up "no. 2". I tried changing the conf. but it keeps on saying access denied. please guys I need your help >.< … | |
Modify the constructor so that the space world paints 300 stars. To paint a star you write the following code: GreenfootImage star = getBackground(); star.setColor(Color.WHITE); star.drawOval(50,50,2,2); this will draw a small white star at location (50,50) with dimensions 2x2. Draw 300 stars with the same dimensions but at random locations. … | |
I have been using some open source software, like weka/mallet to fulfill certain data analytics works. I know how to use the APIs of these softwares and write customized code under Eclipse. Right now, I would like to learn how to make this type of data analytics work as a … | |
I want to create a java application where you can build simple logic circuits (just started learning java recently and it was just a random project idea I got off the net) Ultimately I want the gates as icons on a pane that users can drag and drop onto a … | |
![]() | I have problem , I only get program to write the frist line but how to write the whole string? When I print that string I get correct ouput? It has 10 lines String fileName = "System.err"; File newFile = new File(fileName); try { if (newFile.exists()) { FileWriter fos = … ![]() |
![]() | I have a problem with writting this program I need to read a csv file and write it to binary then read it again. I has to be written in this way: Field name Data type Name First Text Name Last Text Birth Day Whole number Birth Month Whole number … ![]() |
This is the instructions Program converts American football plays into scoring points Touchdown – 6 Extra point after touchdown – 1 Field goal – 3 Touchback – 2 Program reads play-name and uses “if-statement” to decide how many points to award Program does calculations in a loop to allow more … |
The End.