32,199 Topics

Member Avatar for
Member Avatar for Nagarajan M

I have .exe file called Myapp.exe.. Now i want to convert .exe to jar file.. That jar file should work in non java system also? I dont have any idea to implement it.. Can anyone plz suggest me how to do it? Thanks in advance..

Member Avatar for stultuske
0
3K
Member Avatar for DavidKroukamp

I have seen many questions on autocompeletion for *java text components* like `JTextField` `JTextArea` `JTextEditorPane` etc. There are not many options either: 1) 3rd party library (like SwingX) 2) DIY (i.e using `DocumentListener`, `JWindow` with `JLabel` etc and a few requestFocusInWindow calls) I chose number 2 and put the code …

Member Avatar for bguild
1
1K
Member Avatar for adikimicky

Hi everyone, I have made a desktop application in NetBeans IDE 7.3. In the dist folder ,there is my project's executable jar file. But by double clicking it is not opening. Can anybody make suggestions about it, Thanks in advance

Member Avatar for ghincelino
0
250
Member Avatar for thunderjuice

Hello, I am new in trying to figure out how to use two classes together. One class is called circle, and is supposed to hold attributes of radius and area. It is also supposed to have the methods of print and computeArea. public class Circle { //global data private double …

Member Avatar for thunderjuice
0
264
Member Avatar for StefanRafa0

hello i have problem with sending emails i have good SMTP and port but the message cant be sendend gives me this error: Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465, response: -1 and here is the code: final String username = "stefanrafaa@gmail.com"; …

Member Avatar for StefanRafa0
0
325
Member Avatar for XerX

Hi, I am having a problem overriding methods in a subclass when they contain private methods from the master class. The is the master: package blabla; public class Person { private String firstName; private String secondName; private String familyName; public Person() { firstName = ""; secondName = ""; familyName = …

Member Avatar for JamesCherrill
0
242
Member Avatar for officallysabbir

I have the following code which is in a class called customerModel. How do I call this method to another method inside another class called customerController? I am abit new to this and have been trying for ages but have had no luck. Please help thank you. public class customerModel{ …

Member Avatar for JamesCherrill
0
473
Member Avatar for Murphyv10

Hey Lads, I Have a problem involving my save method , basically i want it to actually save a file which is of type JTable UnFortunetly its not , a Push in the right direction would be great. save.addMouseListener(new MouseAdapter(){ public void mouseClicked(MouseEvent e){ JFileChooser fc = new JFileChooser(); int …

Member Avatar for JamesCherrill
0
1K
Member Avatar for hostguy

i wanna send a username and password securely from php page(Apache server) to the Java api (Tomcat server). That api should verify them and open the api in the browser. How can i achieve it guys??? I tried to use webservice but the response from the api is sent to …

Member Avatar for Webville312
0
248
Member Avatar for solomon_13000

Base on my understand a mediator is a central authority that varies the interaction between objects in the same group. So can I classify the code below as a mediator? package com.mediator; public class BaseMediator { public void store(){ System.out.println("store"); } public void retrieve(){ System.out.println("retrieve"); } } package com.mediator; public …

Member Avatar for solomon_13000
0
229
Member Avatar for alexsamam

package pkg2.pkg3; import java.io.*; import java.util.logging.Level; import java.util.logging.Logger; class pachet { double adresaS; double adresaC; String com; String raspuns; pachet(double adrS, double adrC, String c, String r) { adresaS = adrS; adresaC = adrC; com = c; raspuns = r; } } class Client extends Thread { pachet p; double …

Member Avatar for Majestics
0
150
Member Avatar for Arman Majumder

A temperature converter GUI. Converts from Celsius to Fahrenheit and vise versa. Tests JLabels, JButtons and JTextFields. *Two separate programs, Converter and Thermometer (Thermometer Class)*

Member Avatar for robinlrandall
0
719
Member Avatar for smellysocks

Write in pseudocode the algorithm for determining the average value of an UNSORTED array of numbers, given an array of "a" with number of elements that have a value "length". Additionally, what is its order in Big-O? If the array of numbers were ordered, can the algorithm change? If so, …

Member Avatar for stultuske
0
66
Member Avatar for Nagarajan M

I have an jar called Myapp.jar.. It is working fine in java installed system.. And my task is to Bundle jre inside jar(Not along with jar(i.e we can put jre and jar in same folder to run a jar as given in following url http://www.mindfiresolutions.com/Run-jar-without-jre-on-windows-machine-76.php )). and I should not …

Member Avatar for Nagarajan M
0
3K
Member Avatar for hostguy

Actually i've a page named(vehicle.php) inside apache server and Java api page (someheader://someip:someport/track/Track?page=map.fleet) inside tomcat server. I created a Restful Webservice in PHP using this link "http://viralpatel.net/blogs/restful-web-service-tutorial-introduction-rest-restful/" And then i sent a username and password from apache server to the java api through webservice, it sends the request correctly and …

Member Avatar for pritaeas
0
183
Member Avatar for jalpesh_007

I have created two socket file,But it is not working in proper way. please let meknow where the porblem is. TCPClient.java import java.io.*; import java.net.*; class TCPClient { public static void main(String ar[]) throws Exception { String fromserver; String toserver; Socket clientsocket=new Socket("localhost",10000); BufferedReader infromuser=new BufferedReader(new InputStreamReader(System.in)); PrintWriter outtoserver=new PrintWriter(clientsocket.getOutputStream(),true); …

Member Avatar for JamesCherrill
0
167
Member Avatar for jalpesh_007

dear all, I will stuck with one problem.I have one java program in which frame will be there. I am fetching some data from database and i am selecting background image from dialogbox. Now i have used BuffereImage class, i want to print that image with text through the printer. …

Member Avatar for jalpesh_007
0
293
Member Avatar for bezzel.zubber

I want to compare between nodes in BST to find the highest salary and im using recursion function in implementing my BST. Below is the question: A company needs to keep all records of its employees. Employee record should contain employee id(4 digit integer numbers), name, department, salary and an …

Member Avatar for bguild
0
232
Member Avatar for harinath_2007

Hi.. My java desktop application runs every time the computer starts up and runs as long as computer is ON. It monitors all the activities and interacts with database more often and will tell me some updates by looking on the internet at regular intervals etc..etc.. So what I usuallly …

Member Avatar for mKorbel
0
164
Member Avatar for lse123

how assign a none static var to a static var in Java/Android? String top5=scoreSaveReturn2(this.x); public static String totalPoints3;//=top5; CannonGame.totalPoints3=top5; // gives error here In a Canvas game if we have a class like: public class CannonView extends SurfaceView implements SurfaceHolder.Callback how transfer from this a var value to this public …

Member Avatar for rubberman
0
200
Member Avatar for Shania_01

Hello, I'm having an issue with set and get method. When i clicked on a button, i set index as 1 however when i use the get method to get the index, the index is returned as 0. I want to call a method if the index is 1. here …

Member Avatar for rubberman
0
141
Member Avatar for somjit{}

i have to create a queue where the dequeue operations will be random. that is , a random location will be chosen, and deleted after returning the data stored at that location. i was going through the two underlying datastructures that im allowed to use **:** linked list , and …

Member Avatar for somjit{}
0
2K
Member Avatar for M4trixSh4d0w

Hi, I've been trying to send a `BufferedImage` through a socket. I can get it to work once, but when I try to get another screenshot, it fails. The server usually gives me a `java.lang.IndexOutOfBoundsException` at `ImageIO.write(capture, "png", client.getOutputStream());` Server Code: //already told server i'm expecting an image try { …

Member Avatar for JamesCherrill
0
2K
Member Avatar for dinamit3

I'm learning about threads and Producer-Consumer model . I haved copy-paste the code from a book and i have a issue. When I run the program sometimes the Consumer gets the next number from the buffer even if the producer hasn't put nothing in the buffer. Example : Producatorul a …

Member Avatar for bguild
0
142
Member Avatar for l.worboyz

I am making an ABACUS MODEL program which adds counters to pegs. The program compiles fine but when i use the test that was issued to me (as pictured) it appears as though my program does not work as intended. I don't know if anyone will be able to help …

Member Avatar for bguild
0
218
Member Avatar for delta_frost

The above code computes the value of a mathematical expression supplied at command line by using the concept of converting infix to postfix,then evaluating the postfix expression. Any comments are appreciated.

Member Avatar for delta_frost
0
457
Member Avatar for JamesCherrill

Here's a simple thing that I can't find a simple solution for - so any suggestions will be very welcome... I have a `Map<String, MyClass>` and if it has more than 1 entry I let the user pick a MyClass instance by displaying the keys. No problem there. If it …

Member Avatar for JamesCherrill
2
300
Member Avatar for StefanRafa0

hello i want to stop the music after pressing other song i tryed much different ways of doing it but no results please anyone help me i have this code ... package passwordsaver1; import java.awt.Dimension; import java.awt.Toolkit; import java.net.URL; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; import javax.swing.JOptionPane; /** * * …

Member Avatar for JamesCherrill
0
413
Member Avatar for yunniesshi

Hello generous java coders!I am really in a desperate situation now. I have a working gui code here: import java.awt.event.*; import java.awt.*; import javax.swing.*; public class CountdownTimer extends JFrame { JLabel promptLabel, timerLabel; int counter; JTextField tf; JButton button; Timer timer; public CountdownTimer() { setLayout(new GridLayout(2, 2, 5, 5)); promptLabel …

Member Avatar for IIM
0
2K
Member Avatar for azil87glenda

The End.