83 Topics
|
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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", "* *","* *","* *", "* *", "* *","*", "* *","* *","* *","* … |
|
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. … |
|
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 … |
|
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 … |
|
[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 = … |
|
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 … |
|
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.*; … |
|
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, |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 = … |
|
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 |
|
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 { … |
|
:( 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; … |
|
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 … |
|
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 … |
|
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 … |
|
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 |
|
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.*; … |
The End.