Help in swing application
hi
can any give me solution to hide the JVM console..
that running behind the application..
is that possible..
Hmmm....
NO
Do you think Sun created javaw.exe just for the fun of it?
If there was some other way to hide the console window javaw.exe would not be included in every JRE.
Similar Messages
-
How to implement Help in Swing Application
Hi..
In my Swing Application I want to put �Help� for Every field..
Ex: After Username field ��� if I press �Whatisthis�. I will explain abt the user name field .in a popup text Area
Thanks
Cheers
Mallikthis may help you...
http://java.sun.com/products/javahelp/
regards
Aniruddha -
Need Help to update the labels in the GUI syncronously - Swing application
Hello everyone,
I need some help regarding a swing application. I am not able to syncronously update the counters and labels that display on my Swing GUI as the application runs in the background. But when the running of application is completed, then the labels on the GUI are getting updated, But I want update the labels and counters on the GUI syncronously as the code executes... below I am giving the format of the code I have written..............
public class SwingApp extends JFrame{
// here i have declared the label and component varibles like...
private JTextField startTextField;
private JComboBox maxComboBox;
private JTextField logTextField;
private JTextField searchTextField;
private JLabel imagesDownloaded1;
private JLabel imagesDownloaded2;
private JLabel imagesDidnotDownload1;
private JLabel imagesDidnotDownload2;
private JButton startButton;
//now in the constructer.............
public Swing(){
//I used gridbaglayout and wrote the code for the GUI to appear....
startButton = new JButton("Start Downloading");
startButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
actionSearch(); //actionSearch will contain all the code and the function calls of my application...........
}catch(Exception e1){
System.out.println(e1);
constraints = new GridBagConstraints();
constraints.gridwidth = GridBagConstraints.REMAINDER;
constraints.insets = new Insets(5, 5, 5, 5);
layout.setConstraints(startButton, constraints);
searchPanel.add(startButton);
//update is a function which initiates a thread which updates the GUI. this function will be called to pass the required variables in the application
public void update(final int count_hits, final int counter_image_download1, final int didnot_download1) throws Exception{
Thread thread = new Thread(new Runnable() {
public void run() {
System.out.println("entered into thread");
System.out.println("the variable that has to be set is " + count_hits);
server_hits_count.repaint(count_hits);
server_hits_count.setText( " "+ Integer.toString(count_hits));
imagesDownloaded2.setText(" " + Integer.toString(counter_image_download1));
imagesDidnotDownload2.setText(" " + Integer.toString(didnot_download1));
repaint();
//this.update(count_hits);
thread.start();
//Now in main............................
public static void main(String[] args){
Swing s = new Swing();
s.setVisible(true);
}//end of main
}//end of class SwingAbove I have given the skeleton code of my application........ Please tell me how to update the GUI syncronously...
Please its a bit urgent...............
Thank you very much in advance
chaitanyaFirst off, note that this question should have been posted in the Swing section.
GUI events run in a separate thread (the AWT / Event Dispatch Thread) than your program.
You should be invoking AWT/Swing events via SwingUtilities.invokeLater().
If for whatever reason you want to have the program thread wait for the event to process
you can use invokeAndWait().
http://java.sun.com/javase/6/docs/api/javax/swing/SwingUtilities.html -
Help Needed in opening a HTML File from swing application
Hi,
I am opening a HTML file in Internet Explorer from my swing application.
I am using the code given below
private final static String WIN_FLAG = "url.dll,FileProtocolHandler";
private final static String WIN_PATH = "rundll32";
String cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
// url is HTML file Path
Process p = Runtime.getRuntime().exec( cmd );
The HTML file is opening up,but it always opens behind the swing application,that makes me every time to maximize the HTML file after it being opened up.
I want to open it in front of the Swing Application.
Any Help Please ?
- ManikandanCheck your Application's JFrame properties (may be ur Frame is set to be in top position ,always),and also check running your application in some other OS.
-
Help please! Using classes in large swing applications.
I am building a fairly large swing application. The class that builds the main frame for the application is getting extremely long with code because I have so many seperate JPanels. I'm using JDialogs wherever possible, but in many cases I need a JPanel within my main frame. I've been trying to build these panels within their own seperate classes, but it seems that the components are not being drawn. Any help or a small example would be great!
So... The question is: You don't know how to use JPanels built in other classes?
You should probably just try to find some sort of reference code and work from that. It's really not that hard -
Launching Browser From Swing Application - Help Needed
Hi,
I am opening a HTML file in Internet Explorer from my swing application.
I am using the code given below
private final static String WIN_FLAG = "url.dll,FileProtocolHandler";
private final static String WIN_PATH = "rundll32";
String cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
// url is HTML file Path
Process p = Runtime.getRuntime().exec( cmd );
The HTML file is opening up,but it always opens behind the swing application,that makes me every time to maximize the HTML file after it being opened up.
I want to open it in front of the Swing Application.
Any Help Please ?
- ManikandanBrowser Utility - Class to launch a URL in a web browser in
a platform independent manner. Includes an optional swing
GUI allowing user customization. [Open Source - GPL]
http://ostermiller.org/utils/Browser.html
BrowserLauncher - Open the system web browser with
particular attention paid to various Macintosh systems.
(Freeware)
http://browserlauncher.sourceforge.net/
Java World - With a little platform-specific Java code, you
can easily use your system's default browser to display any
URL in Windows or Unix.
http://www.javaworld.com/javaworld/javatips/jw-javatip66.html
JConfig - Class Libraries that allow a URL to be launched in
a browser on Windows, Unix, or Macintosh. [Commercial]
http://www.tolstoy.com/samizdat/jconfig.html
Apple - MRJFileUtils.openURL() not implemented in Mac OS X.
http://developer.apple.com/techpubs/macosx/ReleaseNotes/JavaGMWebReleaseNotes.html#MRJToolkit
Apple - How one would open a URL in a web browser on a
Macintosh.
http://developer.apple.com/qa/java/java12.html -
How to get mouse wheel action in my swing application?
Hi
In my mouse, i am having mousewheel to support scrolling.With the help of the wheel, i can scroll the pages in IE browser or any other appliction.
In swing application ,i have scroll bar inside a JFrame.I want to have mousewheel action in my swing application to support scrolling.
any idea ???
ThanksAs far as I know,there is no facility for detecting mouse scrolling wheel in JDK 1.3.
Check it in the later releases of JDK. -
Can not launch swing application from Java Web Start 1.6.0_37
I have a dynamic generated jnlp file from a serlvet. When I used Java Web Start to start the swing application, it failed. The exception showed
com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://xxxx.xx.com:9080/dilpipweb/Test-1.0-SNAPSHOT.jar
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I used janela to validate the generated jnlp file. It was valid. I also checked the tomcat access log, it showed that the Test-1.0-SNAPSHOT.jar file was accessed correctly (with a 200 return code).
Can anyone help me what was the problem?
Thanks,Hi.
I got a different problem. My Corba application works in JRE 1.6, but doesn't works in JRE 1.5.X. I got an unexpected error and my console shows:
getSubjectX500Principal NoSuchMethodError: java.lang NoSuchMethodError
#### Java Web Start Error:
#### null
Can you help me? -
Problem in Opening HTML Page in Internet Explorer from my Swing Application
Hi,
I am opening a HTML file in Internet Explorer from my swing application.I am using the code given below
private final static String WIN_FLAG = "url.dll,FileProtocolHandler";
private final static String WIN_PATH = "rundll32";
String cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
// url is HTML file Path
Process p = Runtime.getRuntime().exec( cmd );
Here there are two things i need to address ...
1)The HTML file is opening up,but it always opens behind the swing application,that makes me every time to maximize the HTML file after it being opened up.I want to open it in front of the Swing Application.I need to implement "Always On Top" functionality for the html page.
2)Whenever i trigger action to open different HTML page,it opens in new Internet Explorer window.
I need to open it in same IE window.
how to solve out these problems ??? any help would be greatly appreciated .Thanks in advance.
- Manikandanany idea about this ????
-
A database connection in a swing application
hi ,
i am developping an intranet stabdalone swing application based on a jdbc connection to oracle8i data server.
in fact i am interested in keeping my user authentification encrypted while this connection is done! is there any method to do it ! i read about SSL but is it supported by web application ! i have a client-server simple connection !
please help !Hello Levi,
You can to do this form:
String appModule = "yourAppmodule";
String config = "yourAppmodule"+ "Local";
ApplicationModule am = Configuration.createRootApplicationModule(appModule, config);
ConnectionMetada cm = am.getTransaction().getConnectionMetadata();
DriverManager.registerDriver(new OracleDriver());
Connection connection = DriverManager.getConnection(cm.getJdbcURL());You can to see this threads:
Retrieve Database Connection
Getting the Connection object out of ApplicationModule
Regards,
Renan -
Loading a JPEG into a swing application...
I need help embedding a JPEG in a swing application(preferrably in it's own container). What should container should I use? Any helpful methods?
Swing related questions should be posted in the Swing forum.
Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html]How to Use Icons. -
My swing application is too slow
Hello
my application is an add-in swing application. It is connect with a posptgres database to show and edit data in this database. The application has about 10 frames and dialog. It run very slow. It may take 20-30 seconds to close a dialog or frame.
Do you have any hint or suggestion so I can increase the speed of the application.
I already increase memory to 512m when run the application by using
-Xms512m
I really need help about this issue. Could you please help
regards
suhuStop doing all the DB accessing in the event thread?
-
Certificate support in Java Swing application
Hi There,
I am new to this Certificate thing and running into issues! Would appreciate for all the help and please ignore for any stupid questions.
Here is my scenario.
1. I do have a client server application and client is a java swing application which connects to a Server application (Using Jetty 4.2.22 as embedded server)
2. Initially, it had a self signed certificate but goal is to support third party certificate (i.e import in the server and then show warning to the client during login)
If somebody has already done this or point me to some example (using Jetty APIs) that would be great help. If not, here is what I am trying to do and some questions.
1. I tried to get some free SSL certificate from the web and imported into the server's KeyStore.
If I do a list from the server using Keystore, this is what it looks like
keytool -list -keystore /tmp/keystore -storepass genview
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 2 entries
self, Dec 3, 2008, PrivateKeyEntry,
Certificate fingerprint (MD5): 0D:58:E8:77:89:09:F8:2B:37:64:37:D5:03:AD:C9:0B
rapid, Jan 6, 2009, trustedCertEntry,
Certificate fingerprint (MD5): 64:9C:EF:2E:44:FC:C6:8F:52:07:D0:51:73:8F:CB:3
QUESTION 1 : why the third party certificate's entry as "trustedCertEntry"? Is it always like this? Do I need to have only one certificate at a time? (If so, just remove the self signed and have 3rd party one)
My Jetty server comes up but when I connect from Client Swing App, the "getServerCertificates()" method only returns one entry i.e self signed one but not the third party one.
I am using like this
URL url = new URL("https://127.0.0.1:port");
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.connect();
Certificate[] certs = conn.getServerCertificates();
Is not this API supposed to return all the server's certificate?
Please guide me or instruct me what to do.
Thanks,
CRBCrossposted and answered.
-
Setting Colors in a Swing Application
Hi Folks,
i have got some Problems to set the Color in a Swing Application. My Problems are that i want to set the Color of a not selected Tab from a JTabbedPane and the color of a table, where it shows no data.
Does anyone have some usefull advice??
greetings tomHi Richard,
you will have to develop a new Collection- and/or ResourceRenderer, depending on which parts you want to change.
Hope it helps
Detlev -
Problem while creating JAR file for my swing application
Hi...
Using my swings application I am trying to Run different software�s .
My program is Running fine from command prompt. If I create JAR file
It is giving error like �Failed to load Main-Class manifest attribute from .jar�
Can anybody help me to creating JAR file
Thanks in advance
Cheers
Mallikhi,
User following command
jar-cmf textfile_name.txt Jarfile_name *
here you have to make manifest file
and making jar file you have reach there by command promt
and manifest file have some constraint also as well as format
format are
Manifest-Version: 1.0
Class-path: jar file name which are using in app separed by space
Created-By: 1.5.0 (Sun Microsystems Inc.)
Main-Class: Main class name
and end of file is not have carriage return
Maybe you are looking for
-
HELP!! Getting An Error Message When Trying To Install An App on my iPhone
This is my first time downloading an app for my phone. I have created an Apple Id, and it will let me login on my laptop, but not on my phone. When I go to install a FREE app on my phone, it gives me this error message saying something like "Apple
-
ALV run in background with oops
Hi all, I created an ALV grid, which runs fine online. In the background however the spool is empty. The program does not dump though, it's just that the spool is empty. Here's the code for creating the grid in background: *.. create main grid cr
-
Mounting Network Drives Without Windows Opening
I have 3-4 Networked drives that automount for my users when they login, but whenever they login it opens up a window for each of the mounted drives. Any way to prevent this? I've tried marking "hide" in system preferences for them in login items,
-
Assets not appearing in reports.
Hi Friends, In Asset accounting for us there are 3 assets not showing in 2011 fiscal year, until last period 0f 2010 they are showing in asset balances report, these 3 assets are not scraped or deactivated . Please advise me what might be the possi
-
How to repeated insert into history by textchanged event problem
Hi guys i have 3 textboxes 1,2,3 textbox1 respresent mobileNo textbox2 represent email textbox3 represent roomno I need to update any textboxes from three based on textchanged event Suppose i need update room no in textbox3 changed event room no is 2