32,199 Topics

Member Avatar for
Member Avatar for BOOMBOOMF

hey im new in java. i needto make GUI for my program buh im confused as to what to wirte in GUI codes and wat to write in Main codes etc. could someone plz help me? mathprogram.java main class [CODE]public class mathprogram { public static void main (String[] args){ addition …

Member Avatar for mKorbel
0
333
Member Avatar for warlord902

I am using smack api to connect to gtalk, I need to retrieve raw xml stanzas that are displayed in debug window of smack. Is there any way to do so?

0
63
Member Avatar for Jake.20

I've been doing this for almost 6 hours and i can't figure out what is in my codes. please if there is someone out there can tell me what is the problem here. [CODE]public class thirdAct { public static void main (String write[]) { int beerNum = 99; String word …

Member Avatar for Jake.20
0
154
Member Avatar for himgar

I have set two environment variables for JAVA JDK. 1. PATH=C:\Program Files\Java\jdk1.6.0_26\bin;%PATH% 2. CLASSPATH=C:\Program Files\Java\jdk1.6.0_26\lib\tools.jar When I compiled the file using javac it was done successfully but when I ran the file using java command I got the following error: Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld

Member Avatar for rajatarora612
0
194
Member Avatar for masterjohji

I have the code given to me by my classm8 which tells the largest , 2nd largest , 3rd largest and smallest number. but I can't understand how his code works.Can someone explain this to me? [CODE]import javax.swing.JOptionPane; import javax.swing.JDialog; public class exer1 { public static void main(String args[]) { …

Member Avatar for peter_budo
0
155
Member Avatar for Riteman

Dear Daniweb members.. Am on ma way to learn java. I hav bit knowledge about c,c++. Since am new to java, I need help for the following questions: 1. Where can i get the java software? (like turbo c++ for cpp)I need a link for it. I heard that it …

Member Avatar for Riteman
0
174
Member Avatar for marcux

Hi all! I have a array problem I can not figure out. I have an array that I copy in a method and returns the copy, but I do not get a copy of the array. I just get strange values. [CODE] public class AClass { private float[] original = …

Member Avatar for JamesCherrill
0
132
Member Avatar for madhub2v

Can any one tell me I learnt about JDBC,Hibernate technologies. I wonder about WEB Projects which uses JDBC technology exist today.? If yes How they are configuring JDBC Logic in web application in practical scenario. thanks.

Member Avatar for masijade
0
128
Member Avatar for lynnajoe

Hi, I need a method that takes an array of Printer type and returns this array sorted by product name. What I have sorts the string names but the thing is it outputs only one product canon. I have been looking at the tutorials and have done much research but …

Member Avatar for stultuske
0
150
Member Avatar for larrymtl

Hello, somehow my program passes directly to else statement after [QUOTE]System.out.println("Would you like to draw another triangle? (Yes/No): ");[/QUOTE] something is wrong with if statement at the end...please help [CODE] import java.util.*; public class Triangle { public static void main (String [] args) { System.out.println("Welcome to the Triangle Program"); int …

Member Avatar for larrymtl
0
211
Member Avatar for winecoding

For the following segment of java code, the method of “run” occurs four times. I am quite confusing about the relationships of these four occurrences of “run”. Can you explain this to me? The original code is pretty long, I just keep the part that is related to my question. …

Member Avatar for NormR1
0
190
Member Avatar for TheVendor

Hello, We are trying to develop a chat client program in a computer science class, but we are running into this error [QUOTE]Invalid reference in inner class to a non-final local variable [/QUOTE]. The chat client will send the users' text to a text file and then read depending on …

Member Avatar for JamesCherrill
0
217
Member Avatar for Feriscool

What I need is to have the same GUI stay, but when the person goes to the menu and selects Editors > NPCSpawner, I need it to change from the default interface that's there (NPCSpawner interface) to the Other GUI (yes, it's called "Other"): [CODE]import org.rsbot.script.*; import org.rsbot.script.wrappers.*; import java.awt.*; …

Member Avatar for Feriscool
0
182
Member Avatar for sowmya.m
Member Avatar for stultuske
-2
85
Member Avatar for kwins

1. variables defined with default visibility can be seen by code in classes in the same package. 2. Every class must have a main method 3. Statically declared variables are instance variables 4. All objects use the same value for class variables 5. Set methods require a parameter 6. Primitive …

Member Avatar for masijade
-1
204
Member Avatar for smoothe19

Well I am totally new to java web development how can I create a simple web app that reads and writes to a database? steps tutorials please. Remember I have absolutely no experience on this. I have read several tutorials but with so many ways and they are mostly difficult …

Member Avatar for masijade
0
67
Member Avatar for vivek.visen

hi i am working on gridview and i want to show my data in gridview on button click by applying java script. so When i show data without applying java script the gridview is visible and as i apply js the gridview becomes invisible while using other controls with the …

0
48
Member Avatar for kukuruku

I am trying to fill up the array den and it is giving me java.lang.NullPointerException Why is that Thanks [CODE]public static void main(String[] args) { Scanner input=new Scanner(System.in); System.out.print("Enter an amount:"); float amount= input.nextFloat(); int denom, i=0; int [] den=null; do{ System.out.print("Enter denominations: "); denom=input.nextInt(); den[i]=denom; i++; } while(denom!=0);[/CODE]

Member Avatar for stultuske
0
71
Member Avatar for jason830

What is the best book to learn java programming? I want a beginners book in java programming, I know very little as I did a short course in school. I know visual basic programming and a few other programming languages already, and now want to learn java programming. If you …

Member Avatar for bhartman21
0
225
Member Avatar for arka.sharma

Hi All, I'm trying to compile an xsd schema using xjc compiler following the command java -jar jaxb-xjc.jar <schema file>.I've set the classpath of these following jar files jaxb-api.jar jaxb-impl.jar jaxb1-impl.jar jaxb-xjc.jar sjsxp.jar jsr173_api.jar activation.jar resolver.jar. It is showing IllegalArgumentException

Member Avatar for stultuske
0
196
Member Avatar for JavaBean
Member Avatar for StormHawk

[B]Question:[/B] Write a program to read in a sentence. Output the sentence and then sort all letters in descending order. Allow users to enter a letter and output the letter with the number of occurrences of that letter, or else indicate that the letter is not found. [B][COLOR="Red"]Use: "I compute …

Member Avatar for JamesCherrill
0
190
Member Avatar for damons

I want to combine a console application with a GUI in netbeans.I tried to do it using a jButton.I want to get the output of the console application into a jTextArea.There is a function called private static void printBytes(byte[] data, String name)in the console application.when calling that function have to …

Member Avatar for JamesCherrill
0
173
Member Avatar for jon.kiparsky

For those of you who have noticed the missing JLS, here's a [URL="http://jls3.ru/j3TOC.html"]mirror [/URL]that I found (through Stack Overflow). I'd like very much to know where it's gone, if anyone has any good information...

Member Avatar for jon.kiparsky
0
95
Member Avatar for jtodd

Hey everyone. I have been playing around with this code and have been getting this error message: Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 7 at java.lang.String.charAt(String.java:686) at PhoneNumber.main(PhoneNumber.java:37) Java Result: 1 BUILD SUCCESSFUL (total time: 8 seconds) I understand what the java.lang.StringIndexOutOfBoundsException means but I don;t …

Member Avatar for JamesCherrill
0
2K
Member Avatar for ssdeep

can we generate a MAC for a text file in javax.crypto and generate a MAC stored in a String variable??????????????

0
94
Member Avatar for sirlink99

I have a menu that I made, and the first time you select a program prom the menubar and click the launch button it launches the program, however when you select a different program, or to to the menu and reselect the same program then click launch it opens 2 …

Member Avatar for sirlink99
0
114
Member Avatar for spartanace

Hey guys for some reason my code displays in the applet viewer in jgrasp and in eclipse, but for some reason it wont display via an html file in any browser. Any Ideas? Thanks in advance. [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.applet.*; public class FamilyTreeTabbedPane extends JApplet implements …

Member Avatar for NormR1
0
531
Member Avatar for PBoucher

Hello All, I am fairly new to Java programming (only a couple of months) and completely new to graphics in Java (couple days). Below is the relevent paintComonent function I wrote. Basically it draws a circuit based on a few member variables. This part works fine. The problem I am …

Member Avatar for PBoucher
0
306
Member Avatar for Mr. pen

Hiii All :D How are you doing ? i'm such a beginner in Java ! however , i made this code i don't know how much professional is it but , I need to use Jfream when I deal with user and Jframe to print wherever I'm using JTable ! …

Member Avatar for Mr. pen
0
190

The End.