Read Serial Port In Java Applet

Jul 19, 2014

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,

View Replies


ADVERTISEMENT

Opening A Serial Port In A GUI

Oct 20, 2014

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.

View Replies View Related

Java - Getting Data RFID Serial Rs232 In JFrame Class

Apr 14, 2014

**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?

Here my RFID class :

package view;
import java.util.*;
import java.io.*;
import javax.comm.*;
public class ListPorts implements Runnable, SerialPortEventListener {
static CommPortIdentifier portId;
static Enumeration portList;

[Code] ....

Is it possible that my RFID class merge with my Main class ?

View Replies View Related

How To Disable USB Port In Netbeans (Java)

Dec 3, 2014

If this is the C Programming codes for disabling the USB port:

system("reg add HKEY_LOCAL_MACHINESYSTEMCurrentControlSetSer vicesUSBSTOR /v Start /t REG_DWORD /d 4 /f");

How can I use the codes below in Java using Netbeans?

View Replies View Related

Display Serial Number Using Two Threads

Jun 4, 2014

Aim : display a serial number using two thread Say (odd numbers)t1=1,3,5,7....99, and (even no) t2=2,4,6,8......100

How to resolve this problem ?

output will be:
1
2
3
:
100

View Replies View Related

Accept User Input And Then Print Its Average In A Serial Way

Mar 13, 2015

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.

View Replies View Related

COM Port Does Not Display In Jcombobox

Feb 1, 2015

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 .

Code :

import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JComboBox;
import gnu.io.CommPort;
import gnu.io.CommPortIdentifier;
import gnu.io.SerialPort;
import java.io.IOException;

[code].....

View Replies View Related

What Is The Coding For Udp Port Scanning

Feb 3, 2014

what is the coding for udp port scanning?

View Replies View Related

Java Applet Error

May 26, 2012

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)

Java Code:

import javax.io.*;
import javax.awt.*;
import javax.lang.*;
import javax.applet.*;
import javax.net.*;
import javax.util.*;
import javax.swing.JApplet;
import javax.swing.JFrame;

public class First extends JApplet {

public void init() {
getContentPane().add(new JLabel("Applet!"));

[code]....

View Replies View Related

Reading COM Port On GPRS Modem

Jul 16, 2014

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."

View Replies View Related

JRE :: Port Number For Active Host Name

Aug 23, 2014

I have tnsnames string and I know one of the following Host is working  say Primary-host .
 
DESCRIPTION =(ADDRESS_LIST= (ADDRESS = (PROTOCOL = TCP)(HOST = Primary-host)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = Secondary-host)(PORT = 1522)))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = ORA112DB)))
 
How to get Port number of only primary Side ?. This needs to do because we cannot get port number using any oracle query.

View Replies View Related

Java Online Applet For Survey

Nov 2, 2014

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.

View Replies View Related

HTML Parameters To Java Applet

Nov 22, 2014

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>

[Code] ....

View Replies View Related

Root Function In Java Applet

May 12, 2014

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:

evap_trans = 0.0135 * SRAD * ( TMEAN + 17.78) * Math.sqrt(TMAX - TMIN);

If I execute above said formulae with out "Math.sqrt" results are ok. If I used then results shows ZERO.

View Replies View Related

Cropping Image In Java Applet

Apr 30, 2012

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.

Code below

import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.image.CropImageFilter;
import java.awt.image.FilteredImageSource;
import java.awt.image.ImageFilter;
import java.awt.image.ImageProducer;
public class CropImg extends Applet implements MouseListener

[Code] .....

View Replies View Related

Java Applet - Background Color Is Not Being Set

Nov 23, 2014

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.

package com.powder.game;
import javax.swing.*;
import java.applet.*;
import java.awt.*;
import java.util.*;
import java.io.IOException;
import java.lang.Math;

[code]...

my exact question is can I rewrite the applet to make a pop out window and should I just call paint()?

View Replies View Related

Embed Java Applet In HTML

May 8, 2013

When I embed java applet in html the "ClassNotFoundException" message appear to me, how to overcome this ....

View Replies View Related

JDBC :: Oracle UCP Connecting To Wrong Port

Apr 10, 2015

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)

View Replies View Related

Java Applet - Sharing Variables With Another Class

Mar 29, 2015

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 ?

View Replies View Related

Java Applet - Open / Zoom In / Out Of Image

Jul 29, 2014

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:

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.net.URL;
import java.io.*;
import javax.imageio.*;

[code]....

how to add an open file button so I can search for the file and then open it into my program.

View Replies View Related

How To Create Sports Tables Java Applet

Jun 1, 2014

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.

View Replies View Related

Java Applet - Displaying Output With Text?

Feb 24, 2014

my java applet - displaying output with text

View Replies View Related

Applets :: Java Applet Freezing At Client Side?

May 6, 2014

We have a weblogic based application, which runs Applet at the client side when the application is launced.

the application is getting freezed for a client.

how we can analyze the cause of this behavior,

1) As to how we can take thread dump or any other details to analyze the issue.

View Replies View Related

Digital Persona Finger Print Java Applet?

Aug 21, 2014

I need a java applet source to capture and verification code that i can integrate with html,

View Replies View Related

Play / Stop / Pause Song Java Applet

Jul 22, 2014

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.

View Replies View Related

Applet Java GUI Building To Display Words To User

Nov 17, 2014

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);

[Code] .....

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved