35,618 Topics

Member Avatar for
Member Avatar for rtrader

I have a generic static inner class inside a generic non-static class. It gives me errors because E cannot be accessed from a static context: [CODE] public class List<E>{ public static class InnerClass<E>{ } [/CODE] How do I fix this? Thanks!

Member Avatar for Ezzaral
0
113
Member Avatar for bobrien314

I am writing a code to read in a mips file to look for data dependencys, but when i read the file in i get all kinds of goofy stuff coming in as well, thanks in advance for any help. [code=java] import java.io.*; import java.util.*; public class hw { static …

Member Avatar for Ezzaral
0
99
Member Avatar for Mackjan

What dose it means at Dice.rollDice(Dice.java:30) java.lang.IllegalArgumentException: n must be positive at java.util.Random.nextInt(Random.java:250) at Dice.rollDice(Dice.java:30) my code is : [code=jva] import java.util.Random; public class Dice { // instance variables. private Random mRandom; private int mSides; /** * Constructor for objects of class Dice */ public Dice(int sides) { sides = …

Member Avatar for Mackjan
0
102
Member Avatar for Hockeyfreak889

How would you make it so that you check if the user has pressed the keys up, down, w or s every half a second

Member Avatar for masijade
0
71
Member Avatar for janustt

I'm not sure where I'm going wrong in this program. I needed to create two different classes, one being the driver class the other the utility class. The purpose is to ask the user for the circle's radius, creating a Circle object, and then reporting the circle's area, diameter, and …

Member Avatar for janustt
0
121
Member Avatar for silentone190

Hello. I am new at this and I'm having trouble getting a total from multiple data. What i need is a total for a final summary. How do i calculate this? i have searched and read many text on this subject, but have had no luck... some how i get …

Member Avatar for silentone190
0
174
Member Avatar for peter_budo

I created menu for mobile phone, where after you make move screen should be repainted and after that a sound should be played. However at present stage sound is played first and just after that Canvas view is repainted. Bellow is skeleton of the class [code=Java] public class ContactMenu extends …

Member Avatar for peter_budo
1
146
Member Avatar for dimples09

This is the main of my program all errors have been solved now I need help sorting my array list with a selection, bubble and insertion sort to print out in alphabetic order using the name as key numeric order using the income as key order of nationality in alphabetic …

Member Avatar for Ezzaral
0
106
Member Avatar for mangel.murti

hi i am beginner i am using j2sdkee1.2.1 and jdk1.3 for deploy my servlets. what is cloudscape in it? how i can use cloudscape for my servlets ? can i dynamically create my database table in servlets?

Member Avatar for sbhavan
0
59
Member Avatar for kc8pdr
Member Avatar for pardeep3dec

Dear Friends, Here i am giving my programme coding and error. file name - MyCanvas.javaimport java.awt.*; import java.applet.*; public class MyCanvas extends Applet { public MyCanvas() { setSize(80, 40); } public void paint(Graphics g) { g.drawRect(0, 0, 90, 50); g.drawString("A Canvas", 15,15); } } When i use command javac MyCanvas.java …

Member Avatar for mangel.murti
0
165
Member Avatar for ymf

I'm trying to get a GUI application to display an image. So far I've got this bit of code: [CODE=java] import javax.swing.*; import java.awt.*; public class DemoImage extends JFrame { public void showImage() { // creates the actual frame with title 'My GUI' and dimensions JFrame frame = new JFrame("My …

Member Avatar for peter_budo
0
194
Member Avatar for shijunair

Hi everyone, I want to retrieve data from database in jsp page based on the particular m_emp_no .I am finding it very difficult so please can you all help me out with the problem. Here is the structure of my database and i am using ms.access [ICODE]m_emp_no m_leavetype m_bal 1004 …

Member Avatar for peter_budo
0
1K
Member Avatar for PoovenM

Hi guys, I'm not really sure how to ask this or what to even search for. I want to write a Java program that can feed data into another program. If the other program had command line parameters then I'd know what to do, but suppose the program I want …

Member Avatar for PoovenM
0
126
Member Avatar for mowen85

The example code below produces two radio buttons, side by side, i.e. [B]O[/B] Keywords [B]O[/B] All Fields Without specifying a width for the selectOneRadio component (which I don't think is the best solution because of user controllable font sizes, etc), "All Fields" wraps across two lines to become: [B]O[/B] All …

0
54
Member Avatar for MrDiaz

Hi, I'm wondering how I can accomplish this. Suppose I have the following array [CODE]String[] randomText = {"hi", "hello", "hey there"}[/CODE]; If I want to print the array I only know how to do so line by line. [CODE]for (int num = 0; num < randomText.length; num++){ System.out.println(randomText[num]); }[/CODE] Can …

Member Avatar for MrDiaz
0
189
Member Avatar for l_03

hello guyz,,do you know best sites to recommend that has a tutorials on "swing" about: a.) sample writing a file on "text file" b.) the saved text file will be read by the main class in JOptionPane (java file) actually, i has on it on bufferedreader,,but i really like to …

Member Avatar for peter_budo
0
210
Member Avatar for elnuk

i hav a project on mind and the proj is to be able to control my laptop from my mobile,controls like shutting the laptop down.i'v gotten d phone simulator and i code with netbeans.i hav an ok knowledge in j2se,i believe it is possible if yes what next?

Member Avatar for peter_budo
0
73
Member Avatar for mangel.murti

hi all new to tomcat.. i installed tomcat on c:/tomcat 5.0.28 and c:\j2sdk1.4.1_07. i run my hello world servlet ,did all stuff making diretories,web.xml for running a servlet .it execute on my system. i search for this in google,but i don't understand !!!! but if my servlets are using or …

Member Avatar for stephen84s
0
156
Member Avatar for redtail

Hi. My PC has WinXP SP2 and I have a problem with webpages not displaying properly in IE6. It seems that any site with the ending .aspx won't load at all, i just get a blank page with no error messages or anything to tell me what the problem is. …

Member Avatar for Frank Wallis
0
151
Member Avatar for defychaos

Hi, I need some help with an assignment due in a few days. It asks me to draw a table using four functions, as well as a main function. The main program should call a char function LProp (3 variables), that calculates the truth-value of the logic expression for a …

Member Avatar for javaAddict
0
104
Member Avatar for Alex Edwards

I typically don't post anything unless I have a question or comment... but I am still trying to understand Serialization for Network-Applications and I ran into a brick wall (repeatedly) during a project that required sending and receiving chunks of data from one Client to another. Be aware of using …

1
79
Member Avatar for Gerbilkit

I am mostly done working on the homework assignment for my class, it requires that I complete an employee directory system that takes a user input value and compare it to 3 values employeeName, employeeID, and phoneNumber. The system must work in such a way that if the search is …

Member Avatar for Gerbilkit
0
126
Member Avatar for qwerty_ytrewq

consider my input file has the following data date type of transaction amount 1 w 100 2 d 230 3 d 550 4 w 430 5 d 1100 6 d 400 so i need to sort the amount in ascending order.So when i sort the amount,the corresponding date and transaction …

Member Avatar for Ezzaral
0
126
Member Avatar for justinmyoung

Hi, I'm having a small problem. After installed a routine system update, which included the newest Java update (though I'm on 10.4.11) I have lost access to my localhost! I thought it was a problem with my server, so I installed another server using MAMP, and through MAMP I can …

Member Avatar for justinmyoung
0
133
Member Avatar for ishitac

Logic circuit builder is a software that simulates AND,OR,XOR gates.I want to give it an attractive GUI wherein gates can be dragged/dropped.How do i accomplish drag and drop in Java?For instance if there is a buuton with an AND gate.if the user clicks on it and drags the mouse pointer …

Member Avatar for Ezzaral
0
261
Member Avatar for artemis_f

Hello, I don't know any Perl but I do know Java. I am studying about Push down automatas at the moment and wanted to make a simulator for myself. I have found some code in Perl that does it but I do not know how I can go about using …

Member Avatar for KevinADC
0
477
Member Avatar for Nina*

I.ve problem with java image processing.I've to convert 2d array into image.I'm using the loadPixels function, but it doesen't work.The Image is never shown on the label. Please help, here is the code of the loadPixels function: [CODE] public static void loadPixels(JLabel label, int[][] pixels) { // 1. convert to …

Member Avatar for Ezzaral
0
993
Member Avatar for teh noobshow

Hello, I currently code in java for a game. But it's a private server... Many people question my way of coding, but i dont. My way of coding is more simpler than the public boolean and public void... As most know for some games you need a class file and …

Member Avatar for javaAddict
-1
100
Member Avatar for JQuinn88

Hey I am trying to created a dice game that roll the dice twice and then ask the user if he/she thinks the next two rolls will be more than or less than the first two. After the third roll the program is then suppose to ask the user if …

Member Avatar for kjduke
0
142

The End.