Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6556825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:59:40+00:00 2026-05-25T12:59:40+00:00

I am having issues with adding an Image to a screen, I have the

  • 0

I am having issues with adding an Image to a screen, I have the following code:

  try {
    Image cima = Image.createImage("/resources/cross.png");
  } catch (IOException ex){
    System.out.println("ERROR");
  }

However it always hits up the exception. I don’t know what’s wrong as I already put in the image in the correct folder

enter image description here

Also would it be possible to combine two layout settings? Say I want top right corner? I want to combine two layout..is this possible?

UPDATE:

With regards to the layout I want to do something like:

form.append(new ImageItem("Top Right", cima, ImageItem.LAYOUT_TOP, null));

but this only gives me the image on TOP.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:59:41+00:00Added an answer on May 25, 2026 at 12:59 pm

    Obviously the URL is wrong. See my answer to this related question:

    • Reading an image in Netbeans

    As for your second question, it is possible to combine multiple layout managers, although each container is limited to exactly one. For more information, see Laying Out Components Within a Container.

    And what exactly do you want to set in the top right corner? I’m sure this can be done using a single layout manager.

    As for placing the image in the top-right corner of the container, there are many ways to achieve this. One way is to simply use a JLabel as seen in the answer provided by @camickr in this question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a record of a gridviewrowcollection. and i'm having issues with adding them
I'm having issue with a simple code downloading a remote image and adding content
After following the official tutorial here: tutorial I'm still having issues adding rows/creating a
Im having issues getting this to work, maybe its not even possible? I have
I am having issues converting a png to tiff. The conversion goes fine, but
I have followed the following railscast about adding pdfkit to an application, and I
I am having issues adding validation methods to a couple of controls in my
I'm following the following blog list below and I'm having issues getting paperclip 2.3.6
I'm having some issues with my default.magic file in clearcase when adding files to
I'm having some major issues with an SQL statement, the following statement causes so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.