49 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for dsmush

[SIZE=4][FONT=Arial]Hi, I'm creating an application that makes use of the GridBagLayout as it is the most useful layout manager for what I need. I made a JPanel and added it to the frame. The result I'm currently getting during run-time is a JFrame with a JPanel placed in the center. …

Member Avatar for Toby_6
1
3K
Member Avatar for OnlyThierry

Hello, I would like to develop a sprite editor. Therefore I have programmed a software like paint. As you can see on the picture, on the right, there is a canvas with a grid on it. I use a GridBagLayout to manage every widgets inside my window. The canvas is …

Member Avatar for JamesCherrill
0
566
Member Avatar for Tre Sivileo

Hey new to JDBC SQL DERBY and Java so I don't know why but my Jtable only shows the columns. Here are my codes for my LeaderboardDAO class. public class LeaderboardDAO extends Dao { private static final Logger LOG = LogManager.getLogger(PlayerDAO.class); public static final String TABLE_NAME = "leaderboard"; private static …

Member Avatar for Tre Sivileo
0
363
Member Avatar for Doogledude123

Flickering occurs when Active Rendering with JPanel, not sure why as I've done this before (couldn't find source code of that project however). Relevant Code: Graphics g = projectDCWindow.getWindowGraphics(); // Gets the Graphics Object from a JFrame g.setColor(Color.BLACK); g.fillRect(0, 0, (int) ProjectDCInfo.getDefaultWindowSize().getWidth(), (int) ProjectDCInfo.getDefaultWindowSize().getHeight()); // Clears the screen projectDCGSM.get().render(g); // …

Member Avatar for Doogledude123
0
2K
Member Avatar for Nation

I have a JTable that a user can input data. I have an image that I would want to put at the top of my page when printed and also another image that I would want to work as footer. How do I print these on the same page including …

Member Avatar for mKorbel
0
1K
Member Avatar for Pravinrasal

Following is my program i need to add scroll to jframe and I have paint method in it package other; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Container; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.ScrollPane; import java.awt.Stroke; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.geom.Line2D; import javax.swing.*; public class MainDrawCycle extends JPanel implements ActionListener { …

Member Avatar for Pramodkumar_1
0
7K
Member Avatar for moaz.amin.37

hello every body. I need a book at java swing package.i am new in java programming and i want to learn GUI so plz help me. i want to download book of herbert schildt. book name swing a beginner guide Author Herbert Schildt

Member Avatar for stultuske
0
346
Member Avatar for Xabush

I'm trying to create a JTextPane that has the following properties: 1. Vowel letters are colored in green 2. Consonants are colored in blue 3. Numbers are colored in red 4. And the maximum number of characters is 26 and all characters are in Upper Case To achieve this I …

Member Avatar for Xabush
0
345
Member Avatar for murali2489

Dear All, In Java Swing, for all components there is a setSize method which takes int height and width as arguments. And we will pass parameters like 600,500 & 400,300 etc... My doubt is what is the unit of these height and width . I mean on what unit, the …

Member Avatar for murali2489
0
5K
Member Avatar for Wolfenstien

Hi! Im new to Java and iv been studying GUI's in it. Just started with swing and tried to make this giu for a calcularot. but it doesnt execute and gives me "java.lang.NoClassDefFoundError" error. im a total noob so i cant figure it out. i'd really appreciate it someone could …

Member Avatar for Wolfenstien
0
268
Member Avatar for mKorbel

- Please how is possible (probably dirty hack) to create [How to Create Translucent and Shaped Windows](http://docs.oracle.com/javase/tutorial/uiswing/misc/trans_shaped_windows.html) - undecorated container (returns *java.awt.IllegalComponentStateException: The frame is displayable.*) - change Look and Feel for (returns *AWT-EventQueue-0" java.awt.IllegalComponentStateException: The frame is decorated*) - by using code from linked official tutorial . import java.awt.*; …

Member Avatar for mKorbel
1
1K
Member Avatar for wolwayne

I am making an examination system desktop application in Java Swing. I have a frame named 'show_class_question' frame. This frame is used to display questions and four options from database. Whenever user clicks 'Next' button I am calling this same frame (show_class_question) again and agian from itself (self - refrencing) …

Member Avatar for stultuske
0
403
Member Avatar for trishtren

Hello, I was hoping someone can help me, im looking for a way to extend a basic shape class in particular the roundedrectangle2d class and be able to draw it in the same way we could handle an object with a simple call to g.draw(object instance); However im having problems …

Member Avatar for JamesCherrill
0
360
Member Avatar for XerX

Hello. I am trying to recreate manually a small celsius-to-fahrenheit converter that I created with Design view before that. I used its code for reference, but still doesn't work. When I run my code I don't get the components drawn on the screen, only an empty window. What am I …

Member Avatar for XerX
0
987
Member Avatar for rancosster

I have a problem with creating drag and drop in Swing. I have written class that represents the toolbar item here is the code shortened code for it: public class ToolbarItem extends javax.swing.JToggleButton implements IToolbarItem, Transferable, DragSourceListener, DragGestureListener { private ModelEquivalent _modelEquivalent; private DragSource _dragAndDropSource; private TransferHandler _itemTransferHandler; public ToolbarItem(ModelEquivalent …

Member Avatar for rancosster
0
439
Member Avatar for 03hasnam

I am unable to execute the editProfile() method in MainMenu class. The purpose of the method is to be able to extract the bean values and display them on the empty textfield. I am not sure if i did it correctly. any recommendations for any changes to editProfile() method. public …

Member Avatar for 03hasnam
0
503
Member Avatar for wannafzan

This is my assignment. I've done it 36 hours straight and I can't think properly so my program looks like kindergarden kid's program. Basically, we have to do a GUI for Pizza ordering. Everything works except for the amount. The output for amount is "0.00". I have to send it …

Member Avatar for wannafzan
0
2K
Member Avatar for crownedzero

I'm just curious about the use of frames/panels etc. What's are your general practices and why? Single main JFrame with multiple internal then toggling visibility of panels within? Just starting with swing and rather curious how other people implement them.

Member Avatar for jalpesh_007
0
135
Member Avatar for alastair1008

basically my program runs like this 1. open up configure GUI 2. get congiguration 3. close configure GUI 4. open up main GUI now when I am testing in netbeans, this works perfectly however, as soon as I compile and try to run the jar file outside of netbeans the …

Member Avatar for alastair1008
0
214
Member Avatar for 47pirates

I am trying to update database by editing cell values in jtable. my table looks like ![a](/attachments/large/2/a.JPG "a") When i edit the value in particular cell and without clicking anywhere if i click on Update button the database is not updated as like this ! ![b1](/attachments/large/2/b1.JPG "b1") but if i …

Member Avatar for dougWill
0
3K
Member Avatar for 47pirates

there are two panel in one panel there is search button and in the another one there is Jtable for displaying search result. In that jtable initially all the records are displayed. But when i try to search, it works but the problem is that i need to click search …

Member Avatar for 47pirates
0
423
Member Avatar for 47pirates

I want to update the contents of Jtable as shown below when the Jcombobox's item state is chaged in the left panel. but i am not being successful in it .Please help. ![untitled29](/attachments/large/2/untitled29.JPG "untitled29") when the table no value is changed in the left panel , i want corresponding Jtable …

Member Avatar for 47pirates
0
510
Member Avatar for v3ga

I just started learning Java (Currently, I know basic swing components like JPanels, text areas, textfields etc) and I have chosen a Logic Circuit Simulator as a project. My objective is to simulate the working of logic gates by making circuits using drag & drop. So far, I have thought …

Member Avatar for v3ga
0
1K
Member Avatar for DavidKroukamp

Hmm i really like what applications like Windows Media Player and VLC player can do, and by this i mean: you know when you are watching a movie or listening to music and you minimize the window? Well if you hover the taskbar icon of the minized window with your …

0
188
Member Avatar for DavidKroukamp

Hey all, I have been wanting to make a cool game in jave such as a fighting game starting off simple with drwing stick figures :). But i was wondering why there are so many java games created in Japplet why not use swing- i know there are games out …

Member Avatar for DavidKroukamp
0
189
Member Avatar for comSysStudent

I'm trying to get my JPanel (JFrame?) to resize itself to fit randomly drawn shapes. I have a shape superclass and right now I'm working with my line subclass. Everything is working fine except I can't figure out how to make the shapes fit the size of the JPanel. Should …

Member Avatar for comSysStudent
0
7K
Member Avatar for abyss776

I've been searching the internet for a way to specify the size of a component within a JPanel, but I haven't been able to find anything that has worked. The best answer I came across was to override the getPreferredSize(), getMaximumSize(), and getMinimumSize() methods of the component, but the component …

Member Avatar for abyss776
0
210
Member Avatar for mhariharasudan

Hi, I am a new Java Programmer.could you help me in resolving this. I am trying to created a JPanel withing a main JPanel. For the nested one, i have included Grid Layout and i am trying to add components to it dynamically. i.e i have added a combo box …

Member Avatar for mhariharasudan
0
1K
Member Avatar for begueradj

Hello people I have a JFrame which container is a JPanel: can you give me a piece of code that shows how to create a grid of rectangles ? I need this information for my poject Thank you

Member Avatar for begueradj
0
2K
Member Avatar for jazz_vill

I have a Java Desktop Application I made and I am now on the process of deploying the application. I tried to use Java Web Start but came up with certain problems. My application is fully working when I start it locally or inside my IDE. But when I try …

0
134

The End.