83 Topics

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 gahhon

Hi, I'm using NetBeans with Java. I have create a JFrame with some checkboxes and a button to open browser go to the specific URL based on the checkboxes' values. But how do I auto-login/auto fill the username and password textbox then trigger the login button? Please kindly advise. Thanks.

Member Avatar for rproffitt
0
463
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 kayleigh0411

I am trying to make a calculator, but I can not seem to figure out how to get the = operation to work. Everything else seems to be working fine, but I am just really struggling with the =. Any guidance in the right direction would be super helpful! import …

Member Avatar for JamesCherrill
0
1K
Member Avatar for sirlink99

Hello Everyone, I am experiencing errors when trying to compile a project in Java 8. The errors are caused by swing components. The code I am using is the following: import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; public class Main2 { public Main2(){ JFrame f = new JFrame (); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setSize(100, …

Member Avatar for JamesCherrill
0
1K
Member Avatar for amogh.max

I would like code to display ms access database dynamically in a jframe . here is my database.**[img]http://i.imgur.com/PtuGLnX.png?1[/img]**.I tried searching a lot but i think i need personal help in this area as this is a suppose to be dynamically updated Jframe.on the other hand i am open to suggestion …

Member Avatar for JamesCherrill
0
408
Member Avatar for CoilFyzx

Hi. I have a JFrame with a JLayeredPane. On the first layer there is a table, then above it there is black transparent layer that allows me options and what-not. I animate the arrival of this transparent layer. However when I do this the panel seems to loose it's transparency, …

Member Avatar for CoilFyzx
0
558
Member Avatar for ferizhandi

I am writing a application.and i need to draw line in jpanel.but it is crash when jpanel add to jframe.this is my code: public class Simplification extends JFrame { JPanel panel; public Simplification(List<List<Integer>> transmitionTable , List<List<Integer>> outTable) { this.setTitle("Simplification Result"); this.setSize(500, 300); this.setLocation(50, 50); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setVisible(true); // do other jobs …

Member Avatar for JamesCherrill
0
217
Member Avatar for Start4me

I was thinking if it would be possible to create a JFrame, and make the title of it to change, such as make the title work as a counter that will display some text like: The window was opened for 1 second. The window was opened for 2 second. The …

Member Avatar for Seldar
0
1K
Member Avatar for ccsj2206

I need help making this to display the results into a Jframe GUI instead of a console im failry new to java so please help me thanks, here is the code ive used: import java.util.ArrayList; public class ThreeArrayLists { public static void main(String[] args) { ArrayList priceList = new ArrayList(); …

Member Avatar for JamesCherrill
0
733
Member Avatar for CoilFyzx

Hello Good day. I have an interesting question as it relates to adding a background image to a JPanel (or whichever component is best for what I'm trying to achieve. Hopefully I'll get some help here.) I have a large picture that I want to use as a background image …

Member Avatar for CoilFyzx
0
387
Member Avatar for tanha

Hi, I have a png image wihtout background and want this png to be my JFrame where the transparent section must be transparent; I have tried different ways I used the setOpaque(), setOpacity(), ImageIO but no clue. I want only my transparent png as JFrame. Any idea and solution will …

Member Avatar for tanha
0
2K
Member Avatar for cheesy_ninja45

I'm trying to make this work, and I keep getting errors, can someone fix it and show me what's wrong? I've been trying to fix this for a few days and I can't. Thanks in advance. import java.awt.*; import java.applet.*; import java.util.*; import java.awt.event.*; import javax.swing.*; public class FrameX extends …

Member Avatar for stultuske
0
223
Member Avatar for mintcrops

I'm using netbeans IDE and I created a Jframe with two Jpanels one is for Jbuttons and other one is for load another Jpanels to it when clicks those buttons. I tried to do it from buttonclick action. Jpanel2 j2=new Jpanel2(); JPanel1.add(j2); j2.setVisible(True); but this code is not working. I …

Member Avatar for mKorbel
0
338
Member Avatar for joseph.lyons.754

I have been tryin to get this to work for the past week if not two >:( with no joy. Worst of all its such a trivial problem. The program asks you to choose a town name from a combo box when you choose the location you shoud be brought …

Member Avatar for JamesCherrill
0
423
Member Avatar for bananacat

I've had enough. I just don't get what's wrong at all. I coded a basic calculator program, and it compiled correctly, no exceptions thingy, sooo... it's probably my mistake --- nothing appears on the calculator's GUI. It's a blank window with just the title. And when executing programs like this, …

Member Avatar for bananacat
0
308
Member Avatar for vaironl

Hello Everyone, I understand this is a basic problem, with a simple solution, but I cannot find a way to fix it. I'm trying to add a Jpanel to a JFrame and when I do the following. g.drawString("HELLO", 500, 0); The string is not seen on screen now if I …

Member Avatar for vaironl
0
1K
Member Avatar for vegaseat

Jython is a version of Python that can use the extensive Java library. Jython uses Python syntax and avoids the rather ugly syntax (at least for Pythonions) of Java. Here we apply it to bring up an image from a file.

4
703
Member Avatar for zlloyd1

This is my program so far: package allin1; import javax.swing.*; import java.awt.event.*; import java.awt.*; public class Allin1 { JFrame frame = new JFrame(); JPanel panel = new JPanel(); JButton b1 = new JButton("Exit"); public static void main(String[] args) { panel.add(b1); //THIS IS THE PROBLEM?? } } The error I am …

Member Avatar for mvmalderen
0
326
Member Avatar for fallen21468

Ok so I am trying to build a little program and I want to be able to click on the skate or dice button and have the program open a new JFrame that has been built in another class. Currently it opens its own JFrame that was built in this …

Member Avatar for fallen21468
0
1K
Member Avatar for jg1405

I am not seeing why this code will not generate the output to my JFrame after it takes the input from the text file? How can I tweak this code to do that? Take input from file and display it on JFrame... JTabbedPane jtpane=new JTabbedPane(); JPanel jpan=new JPanel(); JTextArea txt=new …

Member Avatar for jg1405
0
1K
Member Avatar for calvintmoss

So I am trying to make a tile map editor/reader to create and interact with maps like [this](http://www.codeproject.com/KB/game/Autotiles_Algorithm/TileMapExample.png) , so essnetially I am wondering what the best way to go about this would be. I have not done anyhting graphical in programming in a long time and yeah, I was …

Member Avatar for ObSys
0
769
Member Avatar for anglwthnati2de

Hi I want to be able to change the name of the JFrame I am working on. It is currently named SwimmingPoolVolumeCalculator. When I go the Company Tab and enter in a name, I want that name to be shown as the new Title of the JFrame. How can i …

Member Avatar for ObSys
0
998
Member Avatar for gurusubramaniam

Hi.. I want redirect a frame into next frame. In swing method how to redirect a frame into next frame ?

Member Avatar for stultuske
0
135
Member Avatar for JakeA

Hi, How do you disable the minimize button in a JFrame. I only want to disable the minimize button, not the close and maximize button. Please help me with this one. Thanks.

Member Avatar for DavidKroukamp
1
2K
Member Avatar for nikolaos

I want to write a version of the SAND GAME. I want to examine the color of every pixel in a Jframe window. I use something like this. Toolkit toolkit = Toolkit.getDefaultToolkit (); Dimension dim = toolkit.getScreenSize(); int height = dim.height; int width = dim.width; GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice …

Member Avatar for nikolaos
0
229
Member Avatar for Kremlin

Hey all, I have a JApplet that runs in browser and I can't get it to create a new JFrame popup when a button is clicked. It works fine in my IDE (Eclipse) but not when I upload it. Here's the code for the JFrame I'm trying to create: import …

Member Avatar for NormR1
0
446
Member Avatar for jimoaks

Hello, I am having some trouble writing this java GUI. First in the win1, i cannot get the start and exit button to the bottom of the page along with the jlabel into the center. Next for win2 i cannot resize the "go here" button at the bottom of the …

0
300
Member Avatar for jimoaks

Hello, I have two problems. First, I am trying to have a set background image that displays with two jbuttons on the bottom. My error is that when the back ground image is displayed it hides the buttons (until you mouse over them). Second, I want the buttons on the …

Member Avatar for JamesCherrill
0
391
Member Avatar for jet101

guys, I need help in swing framework... what method is being used when you have to pressed exit button first before opening other frames? It's like an equivalent of showDialog() from C#.net.

Member Avatar for jet101
0
204

The End.