31,001 Topics

Member Avatar for
Member Avatar for jrookie

Hi, I'm trying to write a program right now that requires inheritance. I understand the concept and what I'm supposed to do, but I'm having trouble with the syntax. I created a class called student and created its methods and attributes, and then I created a constructor called student. Next …

Member Avatar for JamesCherrill
0
112
Member Avatar for tkpanther

Hello everyone, It has been a while since I last logged on. It has been a while since I really needed any major help in programming. But I am here now and I do need a bit of help. Let me start off by saying that I have tried to …

Member Avatar for tkpanther
0
3K
Member Avatar for sciprog1
Member Avatar for sciprog1
0
76
Member Avatar for rcossy1023

I am trying to write a dropout stack/queue using a Linked List, I have already done the code for Arrays but I am coming across a problem. I do not understand doubly linked list, specifically creating a pointer the previous. I believe I have done the push correctly (5 being …

0
57
Member Avatar for shrutinr

Hi.. I m haiving problem in retrieving selected data from combobox of servlet page . I have combobox in servlet and want to display selected value in d same page.. please help me to resolve this problem.. Here is my code: PrintWriter pw=response.getWriter(); pw.write("<h1>Welcome to Shopping cart</h1>"); pw.write("<form name=myform method=post>"); …

0
73
Member Avatar for lotrsimp12345

TITLE SHOULD ACTUALLY BE: how to get mouselistener to work on method in an class in java If I click a circle it should change the color of the circle. But, I am having difficult getting it to work. Help appreciated. Main just calls this class and calls the init …

Member Avatar for quuba
0
263
Member Avatar for ceyesuma

Hello. I am not sure how this is supposed to work. I need to find a file that will be in a folder data/gm in my package. If I move the program around is there a way to have the program find its new absolute path [icode].getAbsolutePath()[/icode] from its path …

0
72
Member Avatar for warook

So We will create a java program but i don't know how to start it. We should use OOP in this one. And there should be minimum of 3 classes (including the main).. Buy n’ Sell An electronics and appliance store would like to install a kiosk for customer use. …

Member Avatar for peter_budo
0
108
Member Avatar for warook

So We will create a java program but i don't know how to start it. We should use OOP in this one. And there should be minimum of 3 classes (including the main).. Buy n’ Sell An electronics and appliance store would like to install a kiosk for customer use. …

Member Avatar for JamesCherrill
0
315
Member Avatar for maxamillian

im new to java and need help with this code. i need to show stars to represent the numbers which have been entered. so far my for loop is only showing the one star, how can i get it to show the number of stars which represent the amount of …

Member Avatar for jon.kiparsky
0
79
Member Avatar for mangeshminal

I want to create linked list of type LinkedList<LinkedList<Integer>>. I plan to take integer values from user (via console), create a linkedlist by adding the values. Create multiple such linked lists and then create a master linkedlist which will have individual linked lists as its elements. Example: User types 1 …

Member Avatar for quuba
0
100
Member Avatar for sToXiC

Hello all. I have a string, e.g. "Testing" and I try to convert it to byte but I get a NumberFormatException. I tried with (byte), Byte.Parsebyte. Any help? thanks

Member Avatar for sToXiC
0
154
Member Avatar for Sunshineserene
Member Avatar for Oregand

Hi guys, This week Ive been given a problem to: Take a set list of English phrases and convert them to a set list of pirate phrases. i.e. Hello would be entered by the user and Ahoy would be printed etc. My idea is to create two arrays, One will …

Member Avatar for Oregand
0
137
Member Avatar for IamNotSam

Hi, I have a task which involves using a queue in order to fill an enclosed region. For example I have chosen this 2d array to apply a flood fill technique to. [CODE] int[][] shape ={ {X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X}, {X,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,X,X,X,X}, {X,X,X,0,X,X,X,X,X,X,X,X,X,X,X,0,X,X,X,X}, {X,X,X,0,X,X,X,X,X,0,0,0,0,0,0,0,X,X,X,X}, {X,X,X,0,0,X,X,X,X,0,X,X,X,X,X,X,X,X,X,X}, {X,X,X,X,0,X,X,X,X,0,X,X,X,X,X,X,X,X,X,X, {X,X,X,X,0,X,X,X,X,0,0,0,0,X,X,X,X,X,X,X}, {X,X,X,X,0,0,0,0,X,X,X,X,0,X,X,X,X,X,X,X}, {X,X,X,X,X,X,X,0,X,X,X,X,0,0,X,X,X,X,X,X}, {X,X,X,X,X,X,X,0,X,X,X,X,X,0,X,X,X,X,X,X} {X,X,X,X,X,X,X,0,X,X,X,X,X,0,X,X,X,X,X,X} {X,X,X,X,X,0,0,0,X,X,X,X,X,0,X,X,X,X,X,X} {X,X,X,X,X,0,X,X,X,X,X,X,X,0,X,X,X,X,X,X} {X,X,X,X,X,0,0,0,0,0,0,0,0,0,X,X,X,X,X,X} …

0
69
Member Avatar for prem2

Dear team, Hi all i have implemented google data api in my project. I have downloaded the api from the below url.This api is used to delete,add,update the google contacts.I have successsfully add ,list the new contacts. [url]http://code.google.com/apis/contacts/docs/3.0/developers_guide_java.html#GettingStarted[/url] But i do no how to delete the contact using this api …

Member Avatar for prem2
0
185
Member Avatar for LianaN

Hi! I would like to change the string: [ICODE]"reg_num, reg_date, attached_file, Description"[/ICODE] to the new string: [ICODE]"reg_num, reg_date, Description, attached_file"[/ICODE]. So, what I need is to search the substring "attached_file" and put in at the end of the main string. How could I do that? Thanks!

Member Avatar for LianaN
0
80
Member Avatar for H0AX4

Am writing this program using two classes for my school project from last 4 days. I have completed this program I think but when am running this program, it shows no error also it doesn't show any logic or runtime error..just got blank screen after compiling. Am wondering that why …

Member Avatar for JamesCherrill
0
136
Member Avatar for Junzification

can you guys help me with my assignment given to me, my prof. said .. create a java class that will accept four Integers & develop a method that will arrange the accepted integer from highest to lowest. example: if you enter random number like: [B]10 6 7 9[/B] the …

Member Avatar for Eric Cute
0
158
Member Avatar for iammet

can somebody help me to put an action in a button that comes from a different class. Specifically t [code]import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; class LogIn implements ActionListener { private JFrame f,f2; private JButton jLog, jCan, jReg,jOk; private JPanel j1, j2, j3, j4,j5,j6; private JTextField jText; private …

Member Avatar for masijade
0
172
Member Avatar for hatux

Hello! I was curious if i could help any guidance on my problem. In my program i have the following class. [CODE] class Match{ String File; String Area; int Score = 0; //public Match(int Index ){ public Match(String File,String Area, int Score){ this.Area = Area; this.Score = Score; this.File = …

Member Avatar for masijade
0
101
Member Avatar for javaking33

I understand that this code will not run because i have 2 string and 1 float type in my text file and i am storing them as int's but how do i do this?.. please someone help me this is so frustrating Here is my .txt file [QUOTE] 100 200 …

Member Avatar for jon.kiparsky
0
183
Member Avatar for kandyhyatt

I am having serious trouble and i don't know what exactly I'm doing wrong can someone please help. Here is the question ? In this assignment you will create a console (standalone) application. This program will allow you to select MegaBall lottery numbers. For the first 5 numbers you will …

Member Avatar for Eric Cute
0
121
Member Avatar for Slyvr

GridBagLayout question My main class holds frame and gets left and right panels from other classes [CODE] /** * Matthew Schrum * 11/14/2010 */ import java.util.Random; import javax.swing.JFrame; public class Sim { public static void main(String[] args) { //variables LeftPanel leftPanel = new LeftPanel(); RightPanel rightPanel = new RightPanel(); //GUI …

Member Avatar for Eric Cute
0
174
Member Avatar for john410

"LeftRightPanel.java:45: setText(java.lang.String) in javax.swing.JLabel cannot be applied to (int) label.setText(num1);" I'm guessing that this is because I'm trying to imput a int in a line where there's supposed to be text. Can I do something like .setNumber, .setNum, or .setInt? Or is this an issue that I need to adrress …

Member Avatar for Eric Cute
0
108
Member Avatar for wizuptech

new in here, new in java world and new in programming at large, but i believe i can learn with the help of professionals and educators in the house. Don't be surprise am staring from such task as a newbie, it 'cos am made to believe i must find a …

Member Avatar for wizuptech
0
88
Member Avatar for flyingcurry

The below method is for my database assignment, and we are supposed to check if the "username" the user adds is already in the database. Somehow "newRecord.username = sc.nextLine();" this line does not work, the second time through the do-while loop It seems like it just ignores the line or …

0
168
Member Avatar for Lxyslckr

I need to make a string by using a loop to a method from ohter class that is named speak(), and is seperated by a \n the problem is in the class public String allSpeak() [CODE] /* public String allSpeak() ( if (count = null) { System.out.println("No Animals to Speak"); …

Member Avatar for Eric Cute
0
130
Member Avatar for helplessa

For the final part of this assignment I need to do the following: Any help/advice/starting pointers would be great! 1) Create a row of Alien attackers, class RowOfAlien, patterned after the partially filled array. Put five Aliens in the row. When the row hits the left or right of the …

0
81
Member Avatar for optikali

Hello all! I am starting to write a little roulette game and while trying to print out my arrays to make sure they contain the correct values the compiler keeps screaming this at me: "non-static method .... cannot be referenced from a static context" Any pointers would be greatly appreciated! …

Member Avatar for optikali
0
87

The End.