I have implemented a Java Swing component that implements Printable. If I add the component to a JFrame, and do this.pack(); on the JFrame, it prints perfect. But if I don't add the component to a JFrame, just a blank page is printed.
This code gives a great printout:
final PrintablePanel p = new PrintablePanel(pageFormat);
new JFrame(...
I'm using a self-made DesktopPaneUI for a JDesktopPane, I've written the proper methods for the class, and I'm running into trouble. When I resize the JDesktopPane, the background image doesn't resize with the frame. The image appears to be clipped at the size it was when the window initially opened. I'm giving it an image larger than th...
Hi I am using the FormLayout. I just discovered it and it's powerful layout manager.
I would like to layout 4 components (outlined, properties, tgraph, library) in 3 columns.
I want to layout my library component on top of the outlined component in one column, the graph and the properties component in one column.
But it doesn't work. M...
I have a Java (Swing) application, running on a 32-bit Windows 2008 Server, which needs to render it's output to an off-screen image (which is then picked up by another C++ application for rendering elsewhere). Most of the components render correctly, except in the odd case where a component which has just lost focus is occluded by anoth...
When i run the code above the frame's menu bar come up when the mouse moves to the upper part of the window. The problem is when i open the menu but do not select any item and move out the mouse the menu bar get invisible but the items stay on screen.
What i'm going to archive is a "auto-hide" menu bar that get be visible when the mous...
I have 2 windows one window shown the JTable Model data, when double click the row will pop up a new window to edit the data, once submit how can I refresh the JTable?
Customer.java :
JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setLayout(null);
jPanel.setSize(new Dimension(792, ...
I'm trying to animate a chess piece in a board. First I created a java.util.Timer object that "scheduleAtFixedRate" a TimerTask implemented as a proxy function. So I kept a record of the piece to move (piece-moving-record) and when it's apropriate (when the user move the piece using the mouse) the TimerTask proxy function should be test ...
Hi!
I have horizontal JList. When user drags element of this list, there is indicator where draged element would be when it droped. But this indicator is horizontal and appears above or under elements of the list. So how can I change it? I want it to be vertical.
Code creating list:
DefaultListModel model = new DefaultListModel();
// I...
I need to display a document, which is in Cp037 character Encoding, in JTextArea? I think JTextArea by default supports UNICODE character encoding. How to add Cp037 charater set support to JTextArea?
...
As in wen you run any output in a frame, every time you run the program it pops on a different position on the screen?
...
I am creating a Java Swing application which displays a window with a table where the user can insert or delete selected elements stored in an array. For this table I have created a table model class extending the DefaultTableModel class.
The problem arises when all the elements have been deleted from the table, as a null pointer except...
Hi,
I am set to create a file explorer using Java. The aim is to emulate the behavior of the default explorer as closely as possible, whatever may be the underlying OS.
I have done NO GUI programming in Java.
I have looked-up Swing, SWT and JFace, and I am beginning my project with this tutorial:
http://www.ibm.com/developerworks/ope...
Do they have any common concepts like C++ and Java do? So that, anyone who learn either gets the basics of other? Like C++ and Java share some common concepts of OOP. You learn them in Java, you can apply them in C++ too and vice versa. Do, Qt and Swing has such property?
...
Hi guys, i'm working on GUI in java and got stuck with move the object.
Please visit this youtube video i made a short demo for you guys to see what i was trying to do. I'm so new to the GUI thing as i've never been taught of doing GUI.
Here is the link: http://www.youtube.com/watch?v=up1LV5r-NSg
...
i have .java file. i need to generate .form file using the java file. when i write a java file then automatically .form file should be created. by using java swings how can we create .form file
...
Is this possible to make aero frame in java swing application?
...
I'm intending to design (and provide a reference implementation for) a new Swing Rich Client Framework. My job and personal experience covers many project-specific Swing client frameworks as well as the Eclipse RCP, and every one of them had some original and clever concepts, but also drawbacks and rigid realizations.
My plan is to inco...
My iPhone SDK and Objective-C learning is moving ahead quickly, thanks to several great books and online help (including this one). But I do have some basic questions due to what I already know that will be answered eventually, but I'd rather get a heads-up now if possible :)
Are there equivalents for LayoutManagers in Cocoa Touch? Ar...
I'd like to add persistence to my Swing-based application; and this is the first time that I'm doing something like that.
I know how to use Java serialization APIs (though I'm using xstream instead), I know that JComponent's are serializable, but I'm interested in more architectural considerations: how an application should be designed ...
Hi,
I am trying to implement a search results popup list similar to the style found here:
http://www.inquisitorx.com/
(I'm not trying to implement a Google search, I'm just using this as a rough example of the style I'm working on.)
In any event, I am implementing this by using a JList contained within a JPopupMenu which is popped up...