83 Topics

Member Avatar for
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 sincerelibran

Dear Friends, I have a frame which is a JSplitPane which is split horizontally into two. On the upper half I want a JFrame to appear and on the lower half I want a JTable to appear. I tired but couldn't get the answer correctly. Will anyone be able to …

Member Avatar for jouj
-1
736
Member Avatar for wallet123

hi hello! im planning to do a payroll system for our defense project,im a beginner and i want our program to be more complicated in a way that we can still be able to explain it. I want our program to be able to have multiple input boxes, because the …

Member Avatar for wallet123
0
117
Member Avatar for fallen21468

I have looked this up and cant seem to find a solution. Nothing I can find will work with my code. I really need help because i am doing this for a class project and nothing will work. Heres what i'm trying to get it to work with. [CODE] import …

Member Avatar for fallen21468
0
14K
Member Avatar for rayden150

first i tried with system.out.. then i tried this: [CODE]import javax.swing.*; import java.awt.*; public class Ejer1 { public static void main(String [] args){ JTextArea graphs = new JTextArea(); String [] graph1 = {"*********"}; String [] graph2 = {"%s\n%s\n%s\n%s\n%s\n", "* *","* *","* *", "* *", "* *","*", "* *","* *","* *","* …

Member Avatar for Xeno999
0
186
Member Avatar for Samwal

Hey there guys, this is my first post here. Really pretty website I must say. I guess you'd expect a programming website to be well built. Haha. But anyways, I've been having some problems recently with a JFrame. I'm a beginner, but I usually do pretty well with resolving errors. …

Member Avatar for JamesCherrill
0
214
Member Avatar for phy2sma

I'm having problems adding a JPanel, which has a paintComponent in it, to a JFrame. If this is the only thing I add to the frame, it works. But as soon as I add a layout manager and add other components to the JFrame, it no longer shows the panel …

Member Avatar for JamesCherrill
0
229
Member Avatar for ThaiAmL

Hello! I'm writing a very simple program to get used to using GUIs, and I'm having a bit of trouble. We're supposed to be writing a program that just creates a window and after the user puts in a number, it calculates the square root and the square of the …

Member Avatar for ThaiAmL
0
212
Member Avatar for Yarra

[B]Ok so i have a program using JFrame when ever i add more than 2 classes in the frame one disappears? How can i add more than 1 class with one of them to dissappear?[/B] [B][I][U]Tester Class[/U][/I][/B] [CODE]public class TestYourFace { public static void main(String args[]) { JFrame frame = …

Member Avatar for mKorbel
0
174
Member Avatar for stakeMyHeart

im creating a prototype for a hotel using netbeans ide 7.0. I used the drag and drop in designing the buttons, panels, label etc... then what i want to happen is when the button is clicked a jpanel/ jframe that i did will appear. How would i do that? I …

Member Avatar for stultuske
0
279
Member Avatar for person192

Hi daniwebbers, I am a newbie learning java and keep getting a "cannot find symbol" error when I try to compile my program. I've tried searching but I don't really know what search terms I should be using in this case. Can anyone see the problem? [CODE]import javax.swing.*; import java.awt.event.*; …

Member Avatar for peter_budo
0
216
Member Avatar for eng_mary

Hi everybody I'm trying to write such a code: [CODE] import pps.PPSFrame; public class X extends PPSFrame{ ..... } [/CODE] Of course there's no such pps package in java. Where can i find it ? or at least PPSFrame.class ? Regards,

Member Avatar for eng_mary
0
233
Member Avatar for kinesaren

Hello I'm new to Java so all help appreciated I have already searched for similar threads but with no results helping me I want to make the text in JTextField to search for the data in the JTable and highlight it. Here is my customer class: [CODE] public class Kund …

Member Avatar for kinesaren
0
238
Member Avatar for skylinepkr

I have made a tetris game on my own and am trying to have options in the menu where when clicked, will change the frame to that size such as small, medium, large. I am trying to do this on a frame and at first I tried setting the preferred …

Member Avatar for skylinepkr
0
121
Member Avatar for LondonJava

I have four JFrames open in an application. I wish for one of them to be the base JFrame, and when one of the others is closed than everything except the base frame will dispose. How do I link the other three JFrames so that when any one of them …

Member Avatar for hfx642
0
457
Member Avatar for bops

Hello. I have a piece of code currently where I have a JFrame that I have removed the title bar and borders etc from using .setUndecorated(true). I have tried a number of ways with no success to make this window draggable by it's client area. [CODE] JFrame f = new …

Member Avatar for JamesCherrill
0
2K
Member Avatar for tr4nquility

I would like to build a simple highlighter program. The idea is to set an image to change the cursor so that it will look like a highlighter. And then, when we move the cursor, it will trace a line along with our movement. The requirement here is to be …

Member Avatar for tr4nquility
0
901
Member Avatar for Danielhuo

I am writing a Java program, a MP3 Manager, but I have problems to work with buttons, TextFields, and TextArea. Here are the problem descriptions. Create a class MP3 with instance variables for: artist, song, album, track length (in seconds). Provide a constructor, get/set methods, and a toString. method. The …

Member Avatar for Danielhuo
0
1K
Member Avatar for Danielhuo

I am writing a program, but I cannot find what is wrong with the code. Only need to show one MP3, or an error message if there are any missing fields or an incorrect entry for seconds. It is not storing information about previous songs; it just display the current …

Member Avatar for peter_budo
0
842
Member Avatar for digan

Hi I am trying to make a program that prints a snooker board on the screen. I am trying to print the different parts on top of each other. So far all I am able to do is print the background. when i try to print the cloth on top …

Member Avatar for hiddepolen
0
382
Member Avatar for powerdink

I need some help. I'm trying to create a number pad like a cellphone that captures user input by pressing buttons in a panel on the left and displaying what the user punches in the top panel. Then I have a clear button in the panel on the right to …

Member Avatar for JamesCherrill
0
186
Member Avatar for woodenduck

I would like to have a loop that creates a JFrame, sets it visible and waits until that JFrame is disposed of before creating another. Is this possible? A solution would be greatly appreciated I can't seem to figure this one out. ex: [CODE]for(int i=0; i<5; i++){ JFrame foo = …

Member Avatar for woodenduck
0
133
Member Avatar for Pravinrasal

want to print Jframe like our word document. I have one jframe on jframe i have Jpanel ond on that panel i have j label . In jlabel i written a letter i want to print that letter so how can I print that letter. thank you

Member Avatar for JamesCherrill
0
274
Member Avatar for superjj

Hi This is a code for placing a few labels. Now, I have a problem with my grid. I want the 0,0 point in the upper left corner but at the moment it is around the middle. Can someone help me please? [CODE]import javax.swing.*; import java.awt.*; public class test { …

Member Avatar for superjj
0
167
Member Avatar for baby_c

:( Sorry the topic spelled incorrectly.. I can't edit it noe.. sorry for that Friends again need you so badly.. I'm developing my simple GIS application, actually here's what I developed so far.. [CODE] import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import javax.swing.BoxLayout; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; …

Member Avatar for baby_c
0
248
Member Avatar for baby_c

Hello friends.I got some problems with a program I'm developing for a assignment. I want to add a image(background) to my Jframe and add some buttons. I wrote the code. I can load image into the frame but when I create the Jbutton and re-size it to smaller button it's …

Member Avatar for baby_c
0
27K
Member Avatar for warlord902

I am facing a strange problem, and seriously I spend lot of time in experimenting different things to get it work but all in vain. I have a JTree whose nodes are been modified by my custom TreeCellRenderer class. My class creates a JPanel for every node and places components …

Member Avatar for warlord902
0
154
Member Avatar for sathya88

am try to create notepad in java... menu item actionlisteners are not working...except exit... what is the problem with my code??? and is there any sequence follow... because am try to use jScrollpane the text area will be blocked??? code is.. [CODE]import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JFrame; import …

Member Avatar for JamesCherrill
0
225
Member Avatar for caswimmer2011

Hi, I'm trying to set a background image of a JFrame. I researched on google but i haven't gotten anything to work. My idea is to make monopoly with the board in the background and have the pieces move around on top of the board. Thanks in advance

Member Avatar for Ezzaral
0
109
Member Avatar for fin4424

Hi so basically im pretty sure i have all my code right and its compiling but for some reason when i run it the frame will load and then quit on me without saying anything i dont know why here is my code [CODE] import javax.swing.*; import java.awt.event.*; import java.awt.*; …

Member Avatar for fin4424
0
257

The End.