32,204 Topics

Member Avatar for
Member Avatar for Doogledude123

I have a custom class which extends JPanel and overrides the paintComponent() method. Here's what that looks like: @Override protected void paintComponent(Graphics g) { if(redrawRequested) { g.setColor(ETCH_BACKGROUND_COLOR); g.fillRect(0, 0, owner.getAppWidth(), owner.getAppHeight()); redrawRequested = false; } g.setColor(Color.BLACK); g.fillRect(pointX, pointY, PIXEL_SIZE, PIXEL_SIZE); } The same custom class also implements KeyListener. I am …

Member Avatar for JamesCherrill
0
422
Member Avatar for divinity02

hi I am trying to build this multiplication game program, well it is the same multiplication game as before. It seems to be working fine but it is not giving me the exact output. first: - when the user enter the correct answer the first time, the game stop when …

Member Avatar for JamesCherrill
0
272
Member Avatar for jamesjohnson25

There are two methods in different classes public EmployeeBean viewEmployeeByID(String EmployeeID) public EmployeeBean findByID(String id) Given, the description of each method of what it supposed to do public EmployeeBean findByID(String id) This method should use the JDBC select statements to retrieve the record based on the given Employee ID, Store …

Member Avatar for jwenting
0
351
Member Avatar for Natheesh

HI. I have been working on a 4 class program. I have some errors and would like to know what I am doing wrong. If you can help out, It would be great. Thank you! Here is a github of all my work. https://gist.github.com/anonymous/b629b37d40e017881108

Member Avatar for jwenting
0
60
Member Avatar for Muwanguzi

I'm muwanguzi lynda doing java but the way of writing a java program is aproblem,Can any one help to write 4 me a code that displays the students name,Reg.no.,course units,the marks & Grades in java.

Member Avatar for JamesCherrill
0
129
Member Avatar for JordanAMAN

I tried to make a program that would give the whole factors for an inputed number. When i run it throught the command prompt it gives me a bunch of 1's, how do I make it to print each factor only once? import java.util.Scanner; public class Factors { public static …

Member Avatar for Taywin
0
258
Member Avatar for JordanAMAN

I am trying to write a program where the user can enter a height and width and it creates a hollow box of asterisks. I can get the stars to print out but what is wrong with my code that it is putting them in weird lines. How do I …

Member Avatar for JamesCherrill
0
961
Member Avatar for Aditya0025
Member Avatar for jwenting
-1
142
Member Avatar for laguardian

Hello guys! I need advice. So I'm working on a Reservation feature of a system. I have created a DAO's for Customer, Employee, and CustomerInquiries. I will explain to you how this works first. The customer creates a "customer inquiry" on the company website to inquire about rental of buses. …

Member Avatar for JamesCherrill
0
232
Member Avatar for GOMEZ_1

whats the best language to use for developing video and image compression apps

Member Avatar for JamesCherrill
0
217
Member Avatar for Aditya0025

hello i m writing a program in which i try to write on the frame by mousemotionlistener and mouselistener methods till now i did the writing part and i i want to start that writing by clicking the button Ok then another frame is open in which i can write …

Member Avatar for Aditya0025
0
445
Member Avatar for kunal135

I just started learning Java. I need to make a chat messenger project in java for my college project. The messenger should be able to send messages,add persons to chat and to see who is online. I have only one month of time for my project. Please tell me how …

Member Avatar for stultuske
0
200
Member Avatar for Elliander_1

I have a program nearly complete - it creates a bank object which creates within it customers and accounts of multiple types and can successfully load this information to display on the screen. The problem is that I am now trying to deposit or withdraw a given balance which has …

Member Avatar for Elliander_1
0
623
Member Avatar for Cory_1

I am writting a code to show the number of ways we can pick k # of objects from n total # of objects, and order them without repetition(n choose k). I am given the recrusive for public static long tough(int x, int y) { if (x < y) return …

0
183
Member Avatar for jeya1562
Member Avatar for fabzster

Hi I am using razorflow chart software to create a dashboard, this works perfectly on my dev server(Locally) but when I upload it to hosted server(Web) it does not load properly. https://www.razorflow.com/ I get the following errors: value is not a number Uncaught TypeError: Cannot read property 'split' of undefined …

0
106
Member Avatar for screenedcreamy

Hello, I am getting this error org.apache.jasper.JasperException: The absolute uri: <requiredURI> cannot be resolved in either web.xml or the jar files deployed with this application. Although the required jar is present in the classpath I am still facing this issue. But if I insert the same jar into web-inf/lib folder …

Member Avatar for screenedcreamy
0
241
Member Avatar for toxicandy

First off, here is the code I will be referencing: package com.airamerica.dataConversion; import com.airamerica.Airports; import com.airamerica.Person; import com.airamerica.Products.Products; import com.airamerica.Products.Tickets; public class FindObject { public static Airports findAirport(String airportCode, Airports [] airportsArray){ Airports airport = null; for(int j = 0; j < airportsArray.length; j++) { if (airportCode.equals(airportsArray[j].getCode())){ airport = airportsArray[j]; …

Member Avatar for overwraith
0
286
Member Avatar for Tierra

Everytime I run this nested code, I just get stuck inside of an infinite loop.. any help? I'm not familiar with nested loops at all. I'm supposed to be getting: 123456 12345 1234 123 12 1 public void displayPatternII (int lines) { System.out.println("\n\tPattern II\n"); for (int i = 6; i …

Member Avatar for jwenting
0
234
Member Avatar for Varunkrishna

Hi guys why am I getting the error identifier expected at the package statement ? Here is my code. package com.example.abstract; public abstract class Car{ private double price; private String color; private String year; private String model; abstract double accelerate(); abstract double horsePower(); public void setPrice(double price){ this.price = price; …

Member Avatar for Varunkrishna
0
1K
Member Avatar for Varunkrishna

Hi guys , Assume the following is my program, is there a way to see how the memory is being allocated by the java program ? How do I use jconsole to find out where in main memory that Integer i = 10 is being saved? public class IntegerCmp{ public …

Member Avatar for Varunkrishna
0
277
Member Avatar for NewOrder

It took me 4 weeks to write this code. The chess game works now . there are no bugs... everything confirms to the chess rules (part from stalemate that i was too lazy to do). i have been learning java for 4 months. what do you think of my code …

Member Avatar for JamesCherrill
0
3K
Member Avatar for laguardian

Hello guys. I'm trying to create a registration form that takes in employee information. The error I'm getting is: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 I'm …

Member Avatar for jwenting
0
2K
Member Avatar for Sloane_1

I'm a tad confused on a homework assignment. I'm supposed to write a program that displays a table of the Celsius temperatures 0 through 20 and their Fahrenheit equivalents. I got the loop to work just fine, but I'm supposed to display the results of the loop in a TextArea …

Member Avatar for JamesCherrill
0
1K
Member Avatar for scheppy

Hey guys I'm looking for some insight in what would be the best way to stop and start a java program remotely with my cell. "For free". Lemme know ANY ideas!!!! Thanks Scheppy

Member Avatar for JamesCherrill
0
115
Member Avatar for LibraryCode

Hi i have a bit of code: On the 1st day of Christmas, my true love sent to me A partridge in a pear tree. On the 2nd day of Christmas, my true love sent to me Two turtle doves, And a partridge in a pear tree. On the 3rd …

Member Avatar for JamesCherrill
0
247
Member Avatar for jamesjohnson25

Actually when the main function is running in a class, it implictly speaks a Main thread is in running in background. public static void main(String[] args){ ...... } Now when we create a thread objects in the above function like this . For example : public class NewThread extends Thread …

Member Avatar for JamesCherrill
0
822
Member Avatar for overwraith

So, I have heard about code porting, basically where you take existing code from one language, and translate it to another language. What I want to know is how does this process work? Are there automated tools for preforming this type of thing, or is it always a manual process? …

Member Avatar for deceptikon
0
244
Member Avatar for jamesjohnson25

I have three files 1. Bank Instance 2. Bank 3. Main // Bank Instance.java public class BankInstance implements Runnable { public Bank bank; public Thread t; public BankInstance(Bank bank,String nameOfCustomer){ this.bank = bank; t = new Thread(this,nameOfCustomer); t.start(); } public void run() { System.out.println("========================================================"); System.out.println("Initial amount in bank"+bank.displayAmount()); System.out.println("Amount after …

Member Avatar for JamesCherrill
0
221
Member Avatar for Lgie

So I have 2 files: M.java, and construct.java. In construct .java, I have 5 instance variables, and made a constructor to initialize the variables. I have also created an getters, adn setters for each instance variable. In Main. java, I created an array: construct[] c= {new construct(int1, string1, string2, string3, …

Member Avatar for JamesCherrill
0
281

The End.