Screen 1 « Development « Java Swing Q&A





1. I'm writing a screen capture module in Java, but I'm having serious performance issues writing screenshots to disk. What else can I do?    stackoverflow.com

I'm writing a screen capture module using the Robot class. I'm taking screenshots of the application every x milliseconds and writing them to disk. After screen capture is finished, I'm compiling ...

2. java & fullscreen over multiple monitors    stackoverflow.com

A snippet from my Java application:

 JFrame f = new JFrame();
 GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
 GraphicsDevice gd = ge.getDefaultScreenDevice();
 gd.setFullScreenWindow(f);
So what it does is make it self fullscreen. Now the odd ...

3. How do you get the screen width in java?    stackoverflow.com

Does anyone know how you would get the screen width in java? I read something about some toolkit method but I'm not quite sure what that is. Thanks, Andrew

4. Custom Java splash screen "freezes" until the whole application has loaded    stackoverflow.com

I have a program that takes a long time to load. Because of this I wanted to develop a splash screen that can provide feedback to the user on what is ...

5. creating splash screen    stackoverflow.com

How to create a splash screen as like netbeans or eclipse splash screen. Please help me for this Regards, Chandu

6. how to make on-screen netbeans preview match runtime    stackoverflow.com

I am trying to get runtime display to match the preview here is what I am looking at: http://i236.photobucket.com/albums/ff111/DrivingTibNaked/Screenshot-1-5.png As you can see the editor does not match runtime. It shows ...

7. Touch screen supported API for desktop development in Java Swing?    stackoverflow.com

I'm developing a system that will eventually be implemented on a touch-screen supported machines such as HP Touchsmart. Are there any relevant references in java swing api that support flicking pages ...

8. Java Swing; How do I make it so the program starts on the right most hand of the screen?    stackoverflow.com

By default, my Swing program starts at the top left hand side of the monitor. Is there a way to make it so it pops up at the right hand ...

9. IzPack and accessibility (using a screen reader)    stackoverflow.com

I'm curious if there is a way to set up an IzPack installer so that it works with screen readers (and has more accessibility features in general). Any thoughts? Thanks in ...





10. How do i update swing application view from one screen to another?    stackoverflow.com

I am a beginner in java swing. I have just created my first login screen using netbean. I like to ask after my actionPerformed if say login successfully. How do i actually go ...

11. Reserving the edge of the screen in Java    stackoverflow.com

How can I make a window (such as a java.awt.Frame, javax.swing.JFrame, java.awt.Dialog, javax.swing.JDialog, etc.) reserve the edge of the screen, like a dock, taskbar, or Microsoft OneNote can? I aim to ...

12. Java app sometimes lock up in Netbeans : D3D Screen Updater, Object.wait, how to fix?    stackoverflow.com

My Java Swing application will lock up 30% of the time when I run it from Netbeans, so I used the debug function to "Debug File", I suspended all other threads, ...

13. Java Swing: Modal loading screen?    stackoverflow.com

I have a Java swing application which loads a web page. Sometimes, the web page takes a while to load depending on the user's internet connection. I want to block this frame ...

14. Touch screen L&F    stackoverflow.com

I would like to do a specialized L&F for touch screens that take care of mouse gestures and size of controls. I have never done a L&F before, so I'm looking for ...

15. How to make Java GUI full screen and similar to Playstation 3    stackoverflow.com

Case

This is not really a games project. Its a project which runs in full screen for showing video conferencing, and watching TV in high definition, and is controlled from a Remote ...

16. Understanding Java Swing screen buffer memory usage (reading materials would be welcome)    stackoverflow.com

So I need to understand how swing allocates memory for buffering screen rendering. Obviously there are duplicates if you have double/tripple/etc buffering. However I would need to know when swing allocates ...





17. Fullscreen java app minimizes when screensaver turns on    stackoverflow.com

I have an app that sets a fullscreen frame but seems to minimize when the screensaver turns on. I want this app to be the only application that the users of ...

18. Best practice to place SWING components in a Java fullscreen application?    stackoverflow.com

I'm currently creating a fullscreen Java application that will be like a kiosk application. The thing is, the application is going to be on multiple different computers with different screen sizes ...

19. Java beginner question - add multiple items to screen    stackoverflow.com

I'm a complete beginner trying to learn Java as my first language. When I'm adding TYPE and Skills to the window, only the one added last (in this case, skills) appears. ...

20. Java Swing - Touch Screen - L & F    stackoverflow.com

I am developing a touch screen based application in Java (using Swing) for a Automat Machine something like this. As the operating system takes care of all the touch ...

21. How can I handle when I change the screen    stackoverflow.com

I try build the 2 Class: LoginScreen Class and MainScreen Class When I run program it will show the login screen first then I use username and password to login the Mainscreen ...

22. Auto-Hide Task-Bar and maximum screen space    stackoverflow.com

It is well documented that code like the following

    final Rectangle bounds = device.getDefaultConfiguration().getBounds();
    final Insets screenInsets = Toolkit.getDefaultToolkit().getScreenInsets(
       ...

23. JSmooth generated exe does not show Splash Screen    stackoverflow.com

I wrap my Java Swing application as an exe using Jsmooth but I can see no way to take advantage of Java 6 splash screen option. I have the following manifest ...

24. Screen meshing into main screen(swing)    stackoverflow.com

I have an issue in Swing Application Screen .I have main screen and pop up screen when user closes the pop up screen it merges into main screen . it occurs ...

25. Gui fullscreen why ??    forums.netbeans.org

HI there, I created a new app using the new Desktop App as a template in Netbeans 6.8. I have added several components to the main frame, for some reason though ...

26. setting size of application equal to the size of user's screen in swing    forums.netbeans.org

Hi all I am developing an application in swing. I want to set the size of the application equal to the size of the user's screen. The same thing can be done using coding as follows: JFrame rootFrame = new JFrame("My Application"); rootFrame.setSize(rootFrame.getToolkil().getScreenSize()); I want to know how we can do this in netbeans. Any help is most welcome.

27. How do YOU set up a search screen?    coderanch.com

I am planning two medium sized Java apps using Swing for the GUI. I am trying to decide the "better" way to set up search screens. Lets say that I am on a client information data entry screen and I need to look up an existing client. How should I set up the search functionality? I have heard two ideas. One ...

28. Heavy weight screen banner    coderanch.com

30. full size of the screen(urgent)    coderanch.com

31. Screen Locking    coderanch.com

HI folks, Any body is having idea about the locking of the frame?? any threads come in to picture for this issue?? My requirement comes when the first instance is launched i can Read/Write, but when the second instance comes up it should be read only??How to go on this issue?? Thanks& Regards, silva.

32. Screen components    coderanch.com

That depends on exactly what you mean... If you launch a frame inside another program, that program can access the components on that frame by using getComponents(), or getContentPane(). If the frame is not running from inside your program, or is not a Java frame at all then it would be very difficult ( or impossible ). -Nate

33. how about full screen exclusive mode in jdk1.4?    coderanch.com

anyone have tested it? does it realy provide "high" performance graphics? how "high" it is? (under Windows and Linux) but the doc says: Nevertheless, this mode is critical for performance and is necessary for enabling hardware page-flipping on Windows. what is it meaning? my display card is Permedia II, it supports DirectX and openGL,(it is a professional 3D card, well, at ...

34. Building a splash screen    coderanch.com

I'm trying to build a splash screen to give info when someone chooses Help->About. I have data that is kept in an .ini file that displays the title, current version, etc. I would like to have an image show in the background, with the data that is read from the ini displayed on top of it. I can use a JLabel ...

35. showing graphs on screen    coderanch.com

37. JPopMenu goes out of screen    coderanch.com

Oops! , i have updated. problem with approach of grouping is that u have to stop that at some point. and thatz the root level. i my case For example. we have a display alpha bets in popmenu,how do u group them . Further my gui is such that the popmenu is always at lower half of the screen,leadng my worry. ...

38. how to lock the system with a blank screen????    coderanch.com

You can't write a program to "lock the System" in Java because all someone would have to do is push Ctrl-Alt-Del to kill the JVM running your program. You'd be better off just putting a password on the screensaver. I'm not sure what you mean when you say "allow the user to use the internet with a password"? Are you writing ...

41. How to get the actual screen res. ?    coderanch.com

43. JSPlash Screen    coderanch.com

44. Splash Screen    coderanch.com

I use this class, /* * SplashDialog.java * * Created on 26 July 2000, 20:31 */ import javax.swing.*; import java.awt.*; import java.awt.ComponentOrientation; /** * * @author thughes * @version */ public class SplashDialog extends JWindow { private String name; private String version; private String year; /** Creates new SplashDialog */ public SplashDialog(String name, String version, String year) { this.name = name; ...

45. Screen Flicker in Swing    coderanch.com

How many textfields? And Why do you need to update all the textfields every 10th of a second? A better way to update text fields based on data would be change only the textfields you *need* to cahnge when their background value changes... you can do this using listeners or custom Documents for your textfields... A lot may depend on the ...

46. screen dumps of swing components    coderanch.com

Hi, can any tell me how to generate screen dumps of swing components?. i have built few swing gui componenets and i need to add them to power point slides. is there any way of doing this. i am not using any IDEs like jbuilder. is there any way of saving swing components as .gif or .jpeg files. any help is ...

47. Real dimension on screen and on paper    coderanch.com

Does somebody knows how I can draw a line of precisely 1 inch lenght on the screen and then on paper. I have write my own component extending JPanel to draw a plan at a given scale. However, when I draw something on the screen I have to use the coordonate system of the given graphics. I can off curse apply ...

48. Screen shot time!    coderanch.com

49. keep the size of a line even if the screen settings are change    coderanch.com

Hi, i have a weird things to do, and found nothing on google and others place... For example, i draw a line of 1 inch into my computer where my resolution is 96dpi and my screen area is 1024x768 i need to made modification to this line to have a 1 inch line on every screen settings. example: my friend that ...

50. Screen update    coderanch.com

Here's an example of what I am talking about... import java.awt.Container; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.SwingUtilities; public class Updater extends JFrame { private JTextField[] text; private JButton open, close; public Updater() { super( "Updater" ); Container pane = getContentPane(); pane.setLayout( new BoxLayout( pane, BoxLayout.Y_AXIS ...

51. Screen doen not render the same on all computers    coderanch.com

Three people running the same application from different computers. We have the same java runtime 1.4.0, same operating system, same executable. The application is called from a menu. When one computer calls the application, the screen is not rendered properly on the screen. The user has to click above the actual buttons to get them to work, for example. The screen ...

52. my application for touch screen    coderanch.com

53. Confirmation screen    coderanch.com

Hi All I have a input screen where user enters some values.I need to show a confirmation screen with all these values and with 2 options like ok and cancel.If he presses ok then i should submit otherwise i should go back to my parent screen. Can you please suggest me how do i do this?? If i use showConfirmDialog i ...

54. How to change the screen lauout at runtime    coderanch.com

Hi All I have a requirement where the combobox contains 3 defferent fundtypes. For each fund type the screen layout is different. How to change the layout of the screen if user changes a fund. One thing i can do is 2 provid 3 independent screens for 3 fund types. I wanted to know is there nay way i can change ...

55. Clear Screen(reset Component)    coderanch.com

56. Reset All Fields in Add User Screen    coderanch.com

Hi, I have a screen (say Add User), containing text field components and Jtable as well. Is there a function (like the reset button) which I can trigger to reset all the values to empty when I click on it? currently, I am calling a function which sets all the values to null manually, as below : public void resetFields(){ jTextField1.setText(null); ...

57. setting screen size    coderanch.com

58. Smart Splash screen    coderanch.com

I have done very little with Swing, so this may be a stupid question, but is there any reason you can't put your initialization code in a method, call that method and then destroy the splash screen when the method is complete? Alternatively, you could put your initialization code in a second thread. Your main code could display the splash screen, ...

59. Expanding Screen horizontally    coderanch.com

60. Screen moves on its own    coderanch.com

Hi, sorry for this if it sounds easy & stupid but here goes: Ive got a Jframe with GRidbaglayout as Layoutmanager. On this frame (on row 1) I have 9 columns which each contain another frame with a graphic. Ok underneath this (row 2) I have a blank label. Underneath this (row 3) I have another big panel (also containing gridbaglayout). ...

61. multi screen programming    coderanch.com

hello the winform project(java swing or c#) require that the ONE computer connect to TWO screens,the screen1 is the operation form screen,the screen2 run a map winform app,the two screen are SYNCHRONIZED.that means if you input the query condition in the screen1 and click query button,the screen2 should highlight the location in the map,if you move the mouse to the screen2 ...

62. How to create screen mockups    coderanch.com

I'd strongly recommend NOT using a GUI builder (Netbeans and JBuilder are two builders often mentioned). In the long term, you will be much better off learning to do it 'long-hand'. I have seen numerous questions - "how do i modify this code, it was created by netbeans and I can't understand how the code works". The answer often is to ...

63. screen flickers    coderanch.com

64. Generic Ok / Cancel Screen --- Alert doesn't do    coderanch.com

How can I make a generic Ok/Cancel Screen that I can reuse again and again. example: A user has just pressed a button to delete a file. This file has names of other files in it that must also be deleted. I want to do the following: if (GenericOkCancel("The Following Sub Files must be deleted Too")){ //They pressed 'Ok' so delete ...

65. Screen Size    coderanch.com

66. Switching screens    coderanch.com

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - ...

67. Full screen mode in Netbeans    coderanch.com

68. spalsh screen    coderanch.com

hi frenz ... i want to make a splash Screen that get disposed after main program screen shows up... but i m not sure of the time that will be taken by the main program... secondly if there is any problem in the main program than it should be intimated to the user...plz help Sandeep Kumar

69. Data entry screens    coderanch.com

70. Screen Flashes    coderanch.com

Hi, I've got a problem with the Breakout game I'm making. The game uses a ball, a paddle, and lots of bricks. I have drawn all the bricks into a JFrame, and then saved the picture as a BufferedImage. This gives me 2 advantages: 1. When the ball and/or paddle are moving, the bricks do not all have to be redrawn ...

71. Data Entry Screen    coderanch.com

Hi All, I have to write a program for data entry. In the main screen (say screen1),I need to display another screen (say screen2) which should stay on top of the main screen. User shouldn't allow to swich back to main screen until the user closes this screen (Screen2).In the screen2 I have to add JTextFields, JButtons etc. I need your ...

72. Splash screen    coderanch.com

What are you trying to do? Unless you are referring to the new splash capabilities in 1.6, a splash screen is just another window -- there's nothing unique about it. Also, I don't think you need to do anothing special as far as threading goes just because you have a splash screen. Demo: import java.awt.*; import java.awt.event.*; import java.net.*; import javax.swing.*; ...

74. native screen resource    coderanch.com

75. How to create a splash screen using java?    coderanch.com

Try this.You can make the modification you want.Hope this provides the basic idea. FrmSplash FormSplash = new FrmSplash(); Thread ThFormSplash = new Thread(FormSplash); ------------------------------------------------ protected void loadSplashScreen(){ //Start the thread ThFormSplash.start(); while(!FormSplash.isShowing()){ try{ //Display the FormSplash for 5 seconds Thread.sleep(5000); }catch(InterruptedException e){ } } } -------------------------------------------- class FrmSplash extends JWindow implements Runnable{ Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); public void run(){ JLabel SplashLabel ...

76. Problem in screen capture    coderanch.com

77. Question about Exclusive Full Screen mode    coderanch.com

I make a JFrame to be fullscreen, but when I excute it, I got a gray screen (fullscreen), then I have to wait for 5-10 seconds for my content to be displayed, and, if I don't change the display mode (ie, just switch to fullscreen without changing width, height and depth), it seems that my content will never be displayed. ge ...

78. linking splash screen to my code    coderanch.com

// Display it setVisible(true); // Wait a little while, maybe while loading resources try { Thread.sleep(duration); } catch (Exception e) {} //setVisible(false);//<--------------not really needed, see next line this.dispose();//<--------------get rid of the splash screen new FoodDailog();//<--------------now show the other class } public void showSplashAndExit() { showSplash(); //System.exit(0);//<--------------you do not want to exit, other class is running now }

79. java.awt.Robot for screen capture    coderanch.com

80. how to come back the previous screen    coderanch.com

Hello Friends, i have two screens A and B ok.. when i press "logout" in A screen i will get B screen as a new pop up screen. the problem is when we have to press "cancle" button in B screen it has to come to same A screen . that means i have to destroy that B screen object completely... ...

81. Intentional Screen Blinking, Swing    coderanch.com

82. Full screen    coderanch.com

Why do you want to make a full-screen-mode application resizable? Doesnt make sense. Also it is a bad usability design. I would recommend the following: 1) Launch in full screen mode (Default) 2) Provide the user with an option of toggling between full screen and non full screen mode. 3) Once the user enters the non full screen mode, s/he can ...

83. Problem to show the screen    coderanch.com

Hi , For example : one screen if i do action performe on one component i can open screen .After open that screen in my requirement i dont access before screen. I have used Jframe for creation of screens. In my code if i try to click on before screen component which i have used to open for other screen, that ...

84. DOS screens to Java GUI    coderanch.com

I have two database tables that contain DOS character mode screen definitions. I am looking for opions of the best methods to use to create a GUI form 80x24 Col/Row, with text fields, and F1 thru F12 buttoms. No other GUI objects are needed. The first table contains the screen master data, eq: screen name, description, columns(80), rows(24), number of objects ...

85. Screen Record Problem with Fat Client Java Application running on Sun JVM    coderanch.com

I have some fact client Java application running in IE browser. Earlier it was running with Microsoft JVM. We swiched to Sun JRE to run it few days back. There is another app which records the screen when this app is running. Since we moved to Sun JRE, the screen recorded started giving problem. Still screens are get captured but some ...

86. Screen Size    coderanch.com

87. splash screen    coderanch.com

88. Spalsh Screen    coderanch.com

89. Swing App Full Screen Mode    coderanch.com

Hello Ranchers, I have developed a full screen frame for a login interface. In order to avoid user minimizing that window by pressing "windows key" or alt+tab or alt+ctrl+del I have added a window activation/deactivation listener. so whenever the frame is deactivated, event-listening code will activate it by calling extendedState() method. But sometimes when frame is restored (after it's minimized) components ...

90. FullScreen    coderanch.com

91. How to check for non java applications are opened in Full screen mode?    coderanch.com

Hi Folks, I have to develop an application in java AWT/Swings, which will run on Windows XP and MAC OS (9+ and X). One of the requirements is that I have to show some pop-ups from system tray on certain events from server(using web services). Here condition is that if there is any application is running in full screen mode (for ...

93. dynamic swing screen generator    coderanch.com

Thank you sean! Let me explain it in more detail. My program is quite complicated: my logic is as follow User input form components into a database table ( label, tooltips, object type...), then I get the record from the table and store them into an array and create a script file (has class, constructor, methods...), then user can just complie ...

94. Problem with fullscreen    coderanch.com

I'm making a game and I want the player to be able to switch between full screen and windowed mode. Here's the code I'm using for the switch: boolean fullscreen = false; public void fullscreen(){ GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); if (fullscreen) { //Exit fullscreen mode parent.setUndecorated(false); gs.setFullScreenWindow(null); fullscreen = false; } else { //Enter full screen mode ...

95. Splash screens    coderanch.com

Hello Everybody, I was just looking at the sun website about splash screens and tried the demo. However when i tried there code the progress bar in the splash screen did not appear. Just wondering if anyone has made one before and could possible set me off in the right direction to get a progress bar to appear in the splash ...

96. Screen Capture    coderanch.com

97. My applications whole screen becomes blank.    coderanch.com

I am having a swing application in which on a particular button click i want to execute many process, due to this reason my whole application freezes and not even able to see any components of my application it just displays a blank screen until the process is completed. Is there any remedy for this. Thank you.

98. Need Help on Remote Host Screen Capture    coderanch.com

This is KrishnaRao fro HYDERABAD.i need help on Remote Host Screen Capture.i found you people did this previously.kindly send me code base for me. Iam using Windows having an ERP package, which requires its screens & its datas to be captured from a remote server. Presently Iam able to capture the screen and its datas Now my requirement is this - ...

99. Detecting the location of Java Application on multiple screen computer    coderanch.com

Hi, We are developing an application using Java Swing and most of the cases, this application will be accessed using JNLP links and Citrix Presentation Servers and all the users will have multiple screens connected to their computers. My problem is, I have to show some warning pop-up windows, alert pop-up windows etc at the center of the application. In case ...

100. clear screen command prompt using gui java code    coderanch.com

hi, i want to implement clear screen functionality into menu item .. when click on menu item clear screen then clear screen command is performed into command prompt and all text into command prompt is clear in prompt is display. so, if it is possible then any one please give me help for coding ... i m in very big problem. ...