Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
0 answers
59 views

I'm trying to write a program that uses Java's GridLayout to display a 2x2 set of GIFs. It runs without any errors but the output window I get is blank. The same code works to display a text label or ...
0 votes
1 answer
68 views

I would like to add an image and some text to the cell of a JTable. Here is the GUI class that seems to cause problems: import javax.swing.*; import javax.swing.table.DefaultTableModel; import javax....
Nocxy's user avatar
  • 181
0 votes
0 answers
88 views

I am working on a Java project for a school-related Task, and I'm experiencing an issue when it comes to loading icon images onto JButtons. So, to start, when I run my JFrame Form directly in the file,...
1 vote
1 answer
71 views

I am trying to make a background image in a java jframe window, but when I try to initialize it, I get a null pointer exception saying the location url I put in is null. I've tried the following: ...
1 vote
1 answer
124 views

I want to move a JFrame window containing a GIF across my screen, but when I try the following: icon = new ImageIcon(spritePath); frame.add(new JLabel(icon)); frame.setSize(icon.getIconWidth(), icon....
3h6_1's user avatar
  • 33
-1 votes
2 answers
118 views

Everything works except when I push run, it doesn't show the icon for the label in the JFrame. Does anyone know how to fix that? public class Frame extends JFrame { private final int speed=5; ...
0 votes
1 answer
73 views

I have the following wpf grid block. I have an image named truc.PNG, a small file image measuring 16x16 pixels. I can see it in the image block, but not as an icon in one of the menu bar items.I've ...
0 votes
0 answers
58 views

In java, why is it that when I import an image and convert it to ImageIcon and display it using JLabel or JButton, it results to a low definition image where I can see the pixels at the edges of my ...
0 votes
0 answers
38 views

Using java Lets pretend we are in folder "src". The parent directory contains folders "src", "assets" and "bin". Since I am in the folder "src", how ...
0 votes
1 answer
37 views

I have an application that works with a JTable, and in this JTable, I want each cell to have both an ImageIcon and some text. I see at this link (https://docs.oracle.com/javase/tutorial/uiswing/...
0 votes
0 answers
56 views

I am trying to add an Image Icon to my game so a logo appears when it is in the task bar. I get no errors when I run my code but the image won't appear. public class Game implements Runnable { ...
-1 votes
1 answer
39 views

I have imported images into my NetBeans project: I'm trying to read the image path and want to display them on JLabels using the scaleImage() method. My code: public Home() { initComponents(); ...
0 votes
0 answers
43 views

I've set my JButtons to be transparent and I added pictures with transparent background to them, but they refuse to become transparent. Moreover, it works on Windows but does not work on my MacBook. I ...
1 vote
0 answers
23 views

public class MyPanel extends JPanel implements ActionListener { final int PANEL_WIDTH = 500; final int PANEL_HEIGHT = 500; Image BackGroundImage2; Image BackGroundImage; ...
-2 votes
1 answer
76 views

I'm trying to move ImageIcon torrentIcon to the left side of JPanel jp, because it's located in the center of panel near the JLabel jl. Neither setBounds() nor setHorizontalTextPosition(), ...

15 30 50 per page
1
2 3 4 5
...
70

AltStyle によって変換されたページ (->オリジナル) /