32,204 Topics
| |
Hello! i am working on a computer based text (CBT) software. i need assistance on how to add a count timer so that once the timer counts from (say 45 - 0) mins, the software should. i will be very grateful if i'm given this assistance... thanks | |
Hi, I'm new to this forum and look forward to contributing. I am currently working on a project where I have to build a Java simulator which consists of three input lines of food, three processing machines and two packing machines. There are 2 processing machines dedicated to processing perishable … | |
Hello, I have been writing a program that allows for client/server communication. The game sends questions to the client, and allows the user to answer the question. It repeats 10 times, then gives a final score based on the user's answers. My question is how do I only allow 10 … | |
When I run the game and try to use the Arrow keys to control the movement of the selection box, nothing happens. I'm pretty sure the game is redrawing itself properly because the ticker text is updating. Aswell, I tried doing: selectVal++; in the update function in TankShooter.Java, which made … | |
I have a class which includes a constructor that holds hours and speed, getters and setters, and a method which calculates distace using the hours and speed variable. I need this to display a table which takes however many hours the user inputs, then for each hour display a row … | |
package Assignments1; public class project { public static void main(String[]args) { While (we have money left to spend and (itemNumber <=max number of items)) { Display amount of money left and number of items that can be bought. Read cost of proposed purchase if(we can afford the purchase) { Display … | |
Hi, I'm a computer science student, my O.S teacher asked us to write a operating system simulator in java, each group of students should write a piece of the simulator, like memory management, process scheduler, file system, etc. My group needs to make the file system part, it's more like … | |
so i have two animation. one is when player is standing and one is when player get hit. 'standing' animation will keep looping for ever. and 'planehit' animation should loop though onces and stop. in player class iam setting up animation by getting images. 'standing' animation has two images. 'planehit' … | |
Hi,can anybody help and guide me on doing this java program? (Largest rows and columns)Write a program that randomly fills in 0s and 1s into an n-by-n matrix,prints the matrix,and finds the rows and columns with the most 1s.(HINT:Use two ArrayLists to store the row and column indices with the … | |
I'm trying to make a dictionary program using linked lists. I need four classes, one that holds the word and the meaning. One that creates the node of information and its link field. Another class that creates and maintains a linked list of words and their meanings. And then a … | |
Hi This code not run : it show this error: incompatible types-found java.lang.String but expected HuffmanCodingAnimation.Node This line of code ` root.left.code = root.code + "0";` Here is the code: import javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.tree.*; /* * This program enables a user to enter text and displays … | |
Hello guys. I have yet another problem. I have a simple app that has "endless" scroll(simple example would be 9gag, except 9gag is a web page), the point is when user scrolls to bottom new items/articles are loaded. I have managed to do the endless scrolling, the problem is when … | |
My top-level package is "com.gmail.email.aviersproject". In .aviersproject have a class that holds my main method and a package "summonerdata". In that package I want a class that gets summoner data by screen scraping. My question is what a good name would be? I was thinking SummonerDataScreenScraper or SummonerDataScraper but it … | |
Ok so I have 2 String variables holding dates in the format dd/mm/yyyy and I need to find the difference in days between them. Ideas? Eg. String date1 = "dd/mm/yyyy"; String date2 = "dd/mm/yyyy"; int difference = (date1 - date2); EDIT: and unless *absolutely* necessary, I dont want to use … | |
Hello everyone. I'm trying to do simple app that has a listview, listview is populated with info from json file. 20 items downloaded at a time. And when user is scrolling to the bottom next 20 items are loaded. Problem is when my app loads next 20 items the scrollbar … | |
Okay, i am creating a code library for myself and i am wondering how does one display java code on an html page? I asked my teacher how to do it and he said he has never done it before and the students told me that is an interesting question. … | |
Hey everyone, Im having trouble with the placement of GUI components and need you help getting the things in the right place. The problem is on the left side where the elements are all misplaced including: The JMenuBar - should be up against the left wall JLabel "content for..." - … | |
I am making a battleship game with 2 boards, each is on a JFrame, but I do not know how to get them to close when a button is pressed in order to show the new one. package battleship; import java.awt.Color; import java.awt.GridLayout; import java.awt.Toolkit; import java.awt.event.WindowEvent; import javax.swing.JButton; import … | |
I thought it would be really cool if JOptionPane could be extended to accept an array of strings that represent messages, and have the method return an array of strings that represent user answers to the messages which are entered into the dialog box. This would make getting GUI input … | |
Hi I am building a website to have interactive feature, and I was thinking of the implementing a live feed for a log file where it would take the content of the log file and do something with it, like create pop ups or images, it sounds possible in my … | |
Task 1 This assignment will consist of writing a couple of small programs that involve practice writing Filename: Seconds.java In a class called Seconds: 1. Write a method called toSeconds that takes in three integer parameters (representing hours, minutes, and seconds) and returns the number of seconds since the last … | |
i need a latest model java run software. where do i find this? | |
Is there any way I can place a video in a JFrame/JPanel? Can someone point me to a tutorial, I can't find anything useful through Google. | |
Hi Everyone, I am trying to get the program below to work correctly. The line below is where I'm having trouble. (line 33 in PrefixCalc.java) calc = new ExpressionTree(new Scanner(console.nextLine())); When I run the program and enter "4 + 8", the scanner only picks up "4". Apparently this program was … | |
This is my code : import java.awt.Button; import java.awt.Component; import java.awt.Container; import java.awt.Frame; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.*; import javax.swing.AbstractButton; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.SpringLayout; public class SpringSample extends Frame implements ActionListener { private static final long serialVersionUID = 1L; SpringSample() { … | |
Hey guys! I am working on a school project where I choose "The Evolution of Technology" as my topic. It'll be from making stone tools and fire to the modern information age. I choose a videogame to represent my research and outcome and I'll use Java. I already knew a … | |
Hello Im trying to send emails thru Java and they have HTML plus embedded images. Everything shows up except the embedded images. What could be wrong? My email is a entire String with HTML code. Thank you | |
i have a class enemyboss and sending it to different class called levelObject. main.java EnemyBoss enemyObject; ... //game loop - actionperformed levelObject.nextLevel(enemyObject); ... //paint method if(enemyObject!=null){ enemyObject.paint(g); } in level.java class i am createding enemyobject class. level.java ... enemyObject = new EnemyBoss(50, 20); ... the problem is nothing prints on … | |
Hey guys, I was wondering if you could tell me if this is even possible or if it can be done another way??? So i have a database with 6 tables all the databases have the same columns except for the tables name ahead of the generic headers pub_name, Hotel_name, … |
The End.