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,
I have created a java gui application and I need to communicate through the serial port. I would like to open the serial port in the beginning of the application and then close it when the applications closes. The problem that I am having is that I created a method to open the serial port in the main function but I can not close the serial port on exit off the application. Is there away of having the serial port be setup so that all methods can access the serial port.
**Getting data on from rfid scanner as Serial rs232 port in JFrame**, in this case I have made a JFrame form and I have a JTextField for storing data rfid as a String. Actually, I found a class from internet that read the RFID reader as byte, now How To get data from my RFID Class to my JTextfield Jframe in my main class as String?
I want to write a program that accepts user input and then prints its average in a serial way.
Suppose i enter 5. I should get result 5 first time then i input 10 then it should return the average of (5 and 10) and then i enter say 20 it should return average of (5,10 and 20) and so on.
displaying COM port in Combo box , see my code below , it does not show any error but it does not show COM port in combo box , instead it shows the class name of Communicator with some garbage data .
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)
I'm a new in java program. I need reading COM port on GPRS Modem. I plug the GPRS Modem in my PC and it has connected. I use Eclipse and create a project and new a file a.java, i collect this following code from the internet and paste it into the a.java file.
Java Code:
package serial; import java.io.*; import java.util.*; import javax.comm.*; //for accessing serialport public class OwnPort { static CommPortIdentifier portId;
[Code] ....
You can see the result here
I don't know the result why return " Set default port to COM4. port COM4 not found."
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 am trying to connect to Sql Server database using Oracle UCP with sqljdbc4-3.0 JDBC driver for Sql Server,with different ports and instances.
– the issue is with the port being ignored in the server string.
For example, using port 1440 connects to the default instance (which is on port 1433) rather than MSSQLINSTANCE1 which is on 1440.
Below are Server hosts used.
sql005.sqlasoftware.com (connects correctly to the default instance) sql005.sqlasoftware.com:1440 (connects incorrectly to the default instance on port 1433) sql005.sqlasoftware.comMSSQLINSTANCE1 (connects correctly to the named instance)
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:
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.
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);