32,204 Topics
| |
I'm new and trying to draw a table type where I can place scores inside like 5; A B C 1 5//this is where it all falls apart 2 3 I have this so far but not working; public class Table3 { static int[][] list = new int[4][4]; //private char … | |
Dear all, I have a program to code which would take several lines of input from user (a fruit name, it's price per kg and the number of kgs sold). Each seperated by a space. It would then output the total money made and the name of the fruit that … | |
I've got a JTable called chances_T full of doubles ranging from 0 to 100. I'm trying to set the background color of each cell based on the cell's value. So I built a custom cell renderer: class CustomRenderer extends DefaultTableCellRenderer { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, … | |
I am trying to cut the decimal off the output of this small code: import java.util.Scanner; public class Distance { public static void main(String[] args) { java.util.Scanner in = new java.util.Scanner( System.in ); double x1 = in.nextDouble(); double y1 = in.nextDouble(); double x2 = in.nextDouble(); double y2 = in.nextDouble(); double … | |
I am trying to set the boolean newEnergy to true only when the item is found. However, it is true at the beginning of the game and remains true until the command 'use' is used. Is there anyway to set newEnergy = true only when the item is found or … | |
public void printmembersdetails() { System.out.printin(member.FirstName = firstname); System.out.printin(member.LastName = lastname); System.out.printin(member.IDNumber = IDnumber); System.out.printin(members.PhoneNumber = PhoneNumber); } System.out.printin(member.FirstName = firstname); System.out.printin(member.LastName = lastname); System.out.printin(member.IDNumber = IDnumber); System.out.printin(members.PhoneNumber = PhoneNumber); } is this right | |
Hello I am trying to create a class that called Lootable and create subclasses such as trunk, locker, etc. that will contain items that can be looted, they will inherit their lootability from the Lootable class. I am thinking of using the ArrayList for this. I have thought of different … | |
I've been trying to do this for the past two hours I have object of type PersonTest I managed to save the data ,but I'm not sure if it correct or not becouse I still can't read the file. I want to read and write using java Object Stream this … | |
| |
I'm trying to creat simple seating for movie I have the seats as buttons when the user click btnOne then the background change to red if the user click the button again it will chnage to gray I've managed to change the color to red when it clicked using actionpreformed … | |
Hello Anyone can help me derive a validation for French phone numbers, given the following: String (max 255 chars) French telephone formats (0123456789, +33123456789, 0033123456789) T.I.A. | |
Hi, I've done with my project and the instructor said that the file should be excutable file how can I run my project wothput netbean .. I'm using macbook | |
I am trying to add an item to a game that will "float" a player into the correct room. The code below is where the boat is added to a room and the the boolean newBoat is set to true: Item boat = new Item(" A boat to help you … | |
Hi, I need to make a program that can count and solve basic math problems (addition, subtraction) with natural integers using strings. I'm not aloved to use parseInt so thats basicly where my world started to fall apart... Would realy appreciate if someone could help me with this. The code … | |
I'm not sure whether my title is clear enough, a bit hard for me to explain. Basically, I have this card abstract class. I also have a CreditCard subclass. In my CardSystem, I have different methods. One of them is chargeCard. What it does is simple putting some cash on … | |
hi friends, I'm developing a desktop application in java. But i want to make this application in such a way so that this install on other PCs. But I don't know the procedure. Please help me with yours valuable experience. Thank You in advance. | |
Hi Guys, Which language would be best for building utility applications for windows?(Tune-Up,Advanced System Care,CCleaner etc.) I'm inspired by the visual display of those programs.I'm currently learning VB.NET and I've beginners knowledge in C++ but I find it too difficult. Note : I'm a professional web designer. | |
Dear all, I am trying to write a code that would take in an array of numbers(salaries) and then calculating the mean and standard deviance. The number of salaries is first asked from the user, therefore the number of elements in the array is not predefined. I have written the … | |
Hello dear codegurus! I've been working on a pet project of mine for 3 weeks now, and I think it is ready to be released into the open! However, just for cosmetic purposes, I would **LOVE** to add an icon (both for the application and in the upper left corner … | |
i have a simple note and images storing java program that stores data into the server..i'm confused about what to use for building the server..should the server be built using sockets?? or which listens for http requests (the client sends json data)?? could anyone please tell me which one would … | |
hi... i am trying to deploy my ejb file which i learned from youtube videos... so i go an Execption while running my clientEjb code.. it is as follows while running my client "HWorldClient"... E:\ejbDemo>java HWorldClient Exception in thread "main" java.lang.NoClassDefFoundError: HWorldClient (wrong name: part1/HWorldClient) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) … | |
How to give user the ability to set the decimal format rounding to whichever s/he prefers. I know that the users input can be gained by the code double decimalRoundTo; Scanner input = new Scanner(System.in); out.print(" Enter the number of decimal places you want to round to "); decimalRoundTo = … | |
Hi Team, I have written a Sample Code in which I cast SubClass reference to point to SuperClass Object. It behaves like a SuperClass reference ( I mean when i try to use Methods which are not in SuperClass,it throws error so it means it is an instance of superclass) … | |
Ok so I'm writing a program that outputs text to a file. Currently, I am writing it to a .TXT file for ease and convenience. Ideally, I would like to output some of the information so that it is formatted with Italics. I'm thinking that using a RTF file would … | |
I'm trying to code an array that will make user print in 125 digits and then add the sum of it, this works but im trying to make the message like: Please enter digit : 1 please enter digit : 2 Please enter digit : 3 ... Do i have … | |
i want to develop a simple download manager..i have seen download managers downloading a file..but they have multiple download points e.g. suppose i have a file like this on a web server ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| download points : 1 2 3 4 5 they are downloading from all the points 1,2,3,4,5 simultaneously..i'm … | |
package hw3.categories; import java.util.ArrayList; import hw3.DiceGroup; import hw3.api.IScoreCategory; /** * Scoring category for a yahtzee. A DiceGroup * with N dice satisfies this category only if all N * values are the same. For a dice group that satisfies * this category, the score is a fixed value specified in … | |
Hey everyone, I really need help in solving a problem that I have to use recursion for. I have a list of paper objects. Each paper object has its own author(s) objects. Each author object knows which paper(s) objects they belong to. I have to build a scholarly neighborhood for … | |
We need it tomorrow, the code for the assignment #3 and #4 question. There was no continuation. Date Class Project (part #3) Add the following data items to your Date class 05 points 1. int dayOfYear 2. String monthName 3. String dayOfWeek Add the following methods to your Date class … | |
Please take a look in my code as below: Vector<Vector<String>> AllSubjects = new Vector<>() ; // PROBLEM IS HERE if ((AllSubjects = EMSSubjectDAO.SelectAllSubjectsByCourse(this.ActiveCourse.getCourseID())) != null) { SubjectTableModel = new DefaultTableModel(AllSubjects, SubjectTableHeader); SubjectTable.setModel(SubjectTableModel); //this.SubjectTable = new JTable(AllSubjects, SubjectTableHeader) ; } On the `// PROBLEM IS HERE` line, if I init `Vector<Vector<String>> … |
The End.