swing

Java: Syntax highlighting component keyevents

Hello, I just met the lib BeanShell. And now I'm making a Java Editor with a run-button who runs the code without compiling. For the texteditor-component, I use the open-source jEdit Syntax Package. Here is a link with a demo: link. Now I wrote code that adds every time the user pressed enter automaticly added the same number of tabs ...

mouse moved -crosshair cursor

I developed a program to draw polygon triangles. The triangles were drawn using mouse drag. The coordinate of the triangles were stored in array list. Every times the mouse cursor, mouse over on the existing drawn triangles(within the area of triangle), the mouse cursor should turns to "CROSSHAIR_CURSOR", however this were not happened. ...

Implementing on-the-fly text styling in a JEditorPane

I have an idea to write a note-taking app in Java that does some simple text replacement as you type; probably a small subset of the Markdown syntax. So for instance, if you entered a line that was #sometext, it would get rendered: sometext Wikidpad is part of what I'm trying to do (I'm not just re-implementing that, just parts of the ...

Make header text bold when its column is selected in JTable

Hi, is possible to turn header text bold when I select a cell of its column? How to do it? Thanks Leandro ...

JavaFX, Swing, or Flex for Java Desktop Applications

Most of the desktop application development I do is in Swing, and I'm curious to hear people's thoughts on using JavaFX and/or Adobe Flex for building desktop applications. Have you had success building desktop apps with these? Or would you stick with Swing for now and use tools to help make Swing development more productive? ...

swing (installanywhere) buttons look broken after updating to Win7

my installanywhere project has swing window with Next, back, etc. buttons and now these look broken (there are no surrounding frames) with my new Win7 machine. Any ideas how to fix these? I believe it happens since JAVA reports itself now "Windows 7" note: AWT buttons work OK ...

How to make a columns in JTable Invisible for Swing Java

Hello, I have designed one GUI in which I have used one JTable from which I have to make 2 columns invisible . How should I do that ? ...

Integrating an existing Java Swing component into a QT widget

We have two massive applications,lets name them "A_app" and "B_app". Both A_app and B_app come with rich editors. A_app's editor is written using Java-Swing and B_app's editor is written using QT. Now we need to be able to integrate A_app's editor in B_app's editor, which would effectively mean that we need to integrate an existing Swi...

Tomcat, ActiveMQ, Swing and a stand alone Java Server

I would probably say this is more of a general posting asking for advice rather than a direct solution request. I am currently in the process of laying down the design and infrastructure for a startup with a colleague of mine, nevertheless, my experience lays in the realm of Java Swing development and JavaScript/Ajax worlds as well as s...

Can groovy's swingbuilder get more than one look and feel in a Java swing application?

Via this question, it would seem that normally you can't mix-and-match look and feels in the same swing app. However, we've been using groovy's swingbuilder to handle all of our GUI code, and groovy seems to do enough black magic that this seemed in the Realms of the Possible. Can swingbuilder set the LaF at, say, the Frame level? (Sp...

Good open-source Swing/Java component for doing MSN-like popup notifications

Hi there, I am looking for a good open-source Java component for implementing popup notifications in a Swing desktop application. The component should be able to function like the ones commonly seen in instant messaging applications such as MSN Messenger, so that just as someone sends you a message, a little ontop window slides up from...

Dynamically changing the column header text in JTable

I have a table with 3 columns which have the following values in the headers: 'No.', 'X [mm]', 'Y [mm]'. This table contain the coordinates of points in millimeters. I have a checkbox on checking of which the table should repopulate to show the coordinates in inches. Moreover, the column header values should be: 'No.', 'X [in]', 'Y [in]'...

Call crystal reports through java

Hi, I have one crystal report and i want to create one front end application using java to show the reports to user. Can any one give me the code how can i invoke crystal reports through a java application? ...

How to create shortcut icon for java program

Hi I have created executable jar of my java program i want to create shortcut icon for that jar. Means may be my jar is in any other memory location of hard drive(eg- D or E drive for windows) but my icon must be at Desktop. So that if i double click on icon from desktop then my application will start. How to create this Thanks Sunil Ku...

Anchoring and Docking Controls in java Swing

In .net there is a control called anchoring that is used to resize controls dynamically with the form. When a control is anchored to a form and the form is resized, the control maintains the distance between the control and the anchor positions. My question is that is there any controls in java that does same functionality as anchorin...

JPopupMenu Behavior

I prepared a small test case below. My problem is when i right click on the window. JPopupMenu show up but if i click anywhere outside the JWindow menu does not disappear. I have to click somewhere on the window to get rid of it which is not the expected behavior. EDIT: after reading akf's answer i switched to JFrame, when frame is in f...

editing a java bean ?

Hello, I'm searching for he source of a graphical bean editor... a (very basic) beanbox if you prefer... Here is what I would like to achieve : I have an application which uses some customizable objects that more or less honor the java bean spec... What I mean by that is that they have getters and setters for most properties... The sw...

Why is a JLabel in a JPopupMenu not respecting its Look and Feel?

I have a Java application with a custom defined Look and Feel in which the user can switch between a light and a dark mode. One of the things we have is a right click popup menu that inherits from the JPopupMenu class. The first thing we add to the menu is a JLabel: add( new JLabel( "<html><i> " + field.desc + "</i><br/>field = " + fi...

multithreading with java swing for a simple 2d animation

hello , my final goal for this application is to animate several items in the same JPanel at a different speed using a thread for each item.the first part is done however the items move at the same speed and i have no idea on how to fix this problem. package javagamestutos; import java.awt.Color; import java.awt.Graphics; import java...

On dialog boxes

I'm trying to make a dialogue box which displays an answer and will print to the screen but am having no success. The code looks like this: /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package dialogbox; import javax.swing.JOptionPane; /** * * @author Tyranax87 */ public class M...