I've been using a Java applet for sports tables.It has been very useful for me. However, the recent developments from the people at Oracle have made this program impossible to use. The point is that I need this program and I need it fast.I've been in touch with the person who once created this applet and he has no intentions at all to upgrade it or do anything to make it function. How to make the program works with their new updates.
I need to evaluate a query by joining these 2 tables and then update the results in the 3rd table in another database. I need to use stateless session bean using JPA I believe. I need 3 Entities for each of the tables here.
We started learning about tables and have a little program. The teacher gave us an excercise and doesn't works (not running), I receive too many errors. So any simple java program with tables with 20 numbers, that is giving random numbers?
On my code, I am getting errors to put ; after the public void's. I'm not sure where the problem is seeing as my textbook pretty much had the same code that I just transferred the different data to....
import java.awt.*; import java.awt.event.*; import java.applet.*; public class MoveIt extends Applet implements ActionListener { private Image cup; private Panel keypad;
What I have to do: Use Applet to create two instances of the Employee class. Display the data on the Graphics object. Display in the applet the names and values of all of the instance variables in each instance of the class. Also display the value of any static variables.
What I'm doing:
import java.applet.Applet; import java.awt.*; public class EmployeeApplet extends Applet { public static int topSalary = 195000; int hoursPerWeek; public static void setTopSalary (int s) { if (s > topSalary)
[Code]...
I'm not able to display hours per week for e1 and e2.
The assignment is to: Use arrays to create an applet that lists five of your favorite songs.
The applet should scroll the list of song titles, one at a timeeach song title should start at the top of the applet and scroll to the middle then, scroll off the right hand sideeach new song title should scroll in a different colourthe applet should loop, that is, when it gets to the end of the list, start over again at the beginning of the list
I already have it looping the text with different colors. It's just they all loop at the same time. How to loop them separately. How to switch the program to where the strings will change with content and color on each loop that would work too.
Here is the code I got so far:
import java.awt.*; import java.applet.Applet; public class FavouriteSongs extends Applet implements Runnable { String[] Songs = {"Travelling Man-Chameleon Circuit", "Sing-Ed Sheeran", "It's Time-Imagine Dragons", "I See Fire-Ed Sheeran", "Colder Weather- Zac Brown Band"}; int yPos = 0, xPos = 50; Thread runner;
Using HQL I am fetching the rows , now i need to iterate through the list and convert each row in the list to a "string" and append the string to a buffer.... How to do it
I am creating a portal using JSP and MySQL with eclipse IDE. I have a scenario where data is stored on draft table and is retrieved then stored on another table. I need the entry in the draft table to be deleted after the insertion. When I tried to run the code it redirects to success page but makes no impact on database(neither inserts not gets deleted).
I am writing a class which formats console output as a table. It displays the type of an entry, the name of an entry, and the data for an entry. I am stuck on a required for loop which appends a tab character to a string, for formatting it as a table. It doesn't seem to be adding any of the tabs and I can't tell what I've done wrong. As far as I can tell the contents of the loop are never reached, and I can't make sense of it.
The ConsoleWriter class that contains the code that is in error...
Java Code:
package frontend; public class ConsoleWriter { private static String tabbedData(String data, int min) { System.out.println(); //for debug int tabcount = 0; int len=8*min;
I am trying to retrieve data from my database by joining my tables. So far i have managed to join my four tables in my database and retrieve all the information in that table. Now what i want to do is create a prepared statement in java that allows me to retreive certain data. Here is my joining query.
SELECT student.idNumber,student.names, student.surname, course.description, coursemarks.mark, class.form,class.id FROM `student` LEFT JOIN `coursemarks` on student.idNumber = coursemarks.studentid LEFT JOIN `course` on course.courseid = coursemarks.courseid LEFT JOIN `class`on student.idNumber = class.studentID;
What I want is to select all the data depending on the class passed and the form passed, e.g a person might decide to select a certain form only or a certain form and class
I'm using jdk7 and I get this error when I compile Exception in thread "main" java.lang.Error: Unresolved compilation problem: at First.main(First.java:16)
For a project I have to create an online survey, I cannot use a per-made online survey system because I have really specific needs that no pre-made system can satisfy, so my idea would be to create it in java and store the data in some simple text file, which are fairly easy to work with in java. My question is, is it possible, and if yes how difficult is it, to put the entire thing online? What worries me isn't putting the applet itself online, but the text files that should collect the data, I already have the website to host it.
I am trying to pass parameters from he following HTML file to an applet. the applet is not initializing and the iam getting the following error on the console. I also have both the html file and and the java applet under the same source file in eclipse.
java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:542) at java.lang.Integer.parseInt(Integer.java:615) at applet.DisplayMessage.init(DisplayMessage.java:16) at sun.applet.AppletPanel.run(AppletPanel.java:434) at java.lang.Thread.run(Thread.java:745)
Here is the html file
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title>
I like to know how to write root function in java applet. I know it in java function. Ex:
import java.lang.*; public class Maths { public static void main(String[] args) { // get two double numbers numbers double x = 9; double y = 25; // print the square root of these doubles System.out.println("Math.sqrt(" + x + ")=" + Math.sqrt(x)); System.out.println("Math.sqrt(" + y + ")=" + Math.sqrt(y)); } }
working fine. but If I tried in applet it's not working. Ex:
I have an applet coded to recieve an image and upon mouse press i wish it to be cropped. For some reason its not implementing, I just think my brain is no longer doing what i think it should be or something, along those lines.
I am trying to go about making this applet a bit different then normal. The issue I am having is it is drawing an applet but, not the right dimensions, it's able to be resized, lastly the background color is not being set. I mean, I suppose I could call paint() and just draw it out but, I read that I could make the applet pop out to the dimensions I would like. None of this is working sadly.
I have An Issue With My Java Applet. Im Trying To Share My Variables With Another Class, But Its Not Working.
Class 1
package com.Tobysmith10.game.main; import java.applet.Applet; import java.awt.Graphics; public class Game extends Applet{ public void init(){ setSize(850,480); public void paint(Graphics g){ g.fillOval(x,y,20,20); } }
Class 2
package com.Tobysmith10.game.main; import java.applet.Applet; public class gameLoop extends Applet implements Runnable{ public int x, y; public void run(){ while(true){ x = 100; y = 100; } } }
So im sharing the x and y variables with the Class 1 , but I get yellow lines under it and when i run the program, it crashes, how do I get class 1 to recognize the variables from class 2 ?
Working on an assignment for a class: Create a DESKTOP application that allows you to open an image file and enables you to zoom in on or out from an image. I believe all I need is too create an open button to open the actual image file, instead of the html link, this code is an example that the teacher provided.My current code:
My company is a transport company. We receive goods form partner and transport it to customers. There is a process that we must accept a number of kilograms into bill after we weigh goods by the electronic balance(the electronic balance have serial port plug in PC) . To decrease this process, I'm looking for a project "read serial port wrote in java applet". Who have code,
In my card game applet I have to play some music and the user must have the ability to play, stop and pause the song using buttons. I got the play and stop to work easy but I'm unable to add the pause option/method.
Implement an applet that display historical facts. The applet will include facts from october 28 to december 4th to test the applet.
What is the best thing to add text in my GUI - JLabel, JTextArea? I am trying to display different words on my csFacts. Once a user click button yesterday and button tomorrow?
public class Facts extends JFrame implements ActionListener{ private JButton button1,button2; private JPanel panel; private JLabel label; TextField ri = new TextField(50); private void createGUI(){ setDefaultCloseOperation(EXIT_ON_CLOSE);