31,001 Topics
| |
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 … | |
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 … | |
Hello Members, Is there a way to make a JDialog unmovable? Thank you! | |
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 … | |
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>"); … | |
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 … | |
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 … | |
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. … | |
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. … | |
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 … | |
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 … | |
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 | |
May I know how to find the largest number in an array? | |
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 … | |
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} … | |
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 … | |
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! | |
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 … | |
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 … | |
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 … | |
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 = … | |
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 … | |
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 … | |
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 … | |
"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 … | |
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 … | |
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 … | |
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"); … | |
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 … | |
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! … |
The End.