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 be appreciated.
It works just fine in Java 7, but there are a number of calls that are needed. Something like this code from an old project's splash screen (maybe some redundancy - it start life under the temporary transparency support in Java 6.21)...
frame.setUndecorated(true); // gets rid of borders title bar etc (call before JFrame is visible)
frame.setBackground(new Color(0, 0, 0, 0)); // frame is transparent
frame.getRootPane().setOpaque(false); // frame content (rootpane) is transparent...
frame.setOpacity(0.0f); // or maybe this achieves the same thing
JLabel iconLabel = new JLabel(); // use JLabel ImageIcon to paint image
URL imgURL = getClass().getResource("/images/xxx.png"); // transparent png
i am trying to create a library management system which is supposed to be used to store/keep infp for the library and the library members( book title, author, name and picture for borrower and other stuffs). The app has 6 buttons, delete, save, add,previsous,next, and upload( for upload ...
I need to comput and display the sum and average of the cubes of the even natural numbers between 2 and n. Where n is entered by the user. Im stuck on how to average the sum of the cubes. Help Please. This is what I have so far.