473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Java netbeans

5 Nibble
How to insert image from jlabel to Excel file using Java netbeans?

I have a desktop application developed in netbeans, what I really want is the Fileinputstream for image from jlabel field to Excel file, I don't know how to insert image from jlabel field to Excel spreadsheet, but I can insert text to the Excel file but I can't insert image from jlabel to Excel file, please help
Mar 9 '21 #1
6 5924
dev7060
636 Expert 512MB
How to insert image from jlabel to Excel file using Java netbeans?
More details required.
Mar 10 '21 #2
dev7060
636 Expert 512MB
Not sure what you mean when you say "from JLabel field". JLabel is a component to display text or images in a container. Show the code and mention the API being used.
Mar 14 '21 #3
91E20
5 Nibble
I just posted the application interface from Netbeans but I really want is
The person image you seeing on the interface there I want to add it to Excel spreadsheet but I don't know the code to export that image from the application to Excel spreadsheet, but am exporting the texts, only the person image I don't know how to export to the Excel spreadsheet.
Attached Images
File Type: jpg Snappshoot.jpg (175.4 KB, 103 views)
Mar 19 '21 #4
dev7060
636 Expert 512MB
show the code and mention the api being used.
^^    ⠀⠀   ⠀⠀   ⠀⠀   ⠀⠀  
Mar 19 '21 #5
91E20
5 Nibble
Dev7060, am so sorry that you are patient with me in understanding
my problem because am new to programming but I appreciate your efforts.

I just posted the code of my problem, the API I used is Swing in java netbeans
that is what am using to develop the application.
So please see attached the code for clarification.
Attached Images
File Type: jpg error code_1616171929300.jpg (210.3 KB, 145 views)
Mar 19 '21 #6
dev7060
636 Expert 512MB
ClassCastException is thrown when there exists no relationship between the classes. The question regarding API was asked with respect to the excel and database. From the attachment, I'm assuming Apache POI and Apache Derby are being used. The question is how are you reading the image. You may not need to extract anything from the label at all. Derby has a special data type to store binary data called Binary Large Object (BLOB).
Expand|Select|Wrap|Line Numbers
  1. Blob blob = result.getBlob("photo");
  2. InputStream inputStream = blob.getBinaryStream();
where result holds the reference of the ResultSet object.
Mar 20 '21 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

20
by: Ilias Lazaridis | last post by:
" A cooperation between Sun Microsystems and IBM&Co. in conjunction with liberal & high evolutive communities would result in an nearly unbeatable programming platform. My evaluation has shown:...
20
by: Bill DeWitt | last post by:
I downloaded the Sun product, and find it feature rich but slow. Can someone recommend a more basic (freeware) IDE which will help a newbie without hiding every bit of code? I can program my way...
0
by: Ginoboy | last post by:
Hello there I have a problem in executing mysql using java netbeans. all i want is to execute a batch file. this is my code: "try { ...
2
by: chriscoder33309 | last post by:
greetings all. I am now coding in Java due to a new employer and was previously a C#/vb.net coder. I wanted to know how to accomplish the below in Java (NetBeans). In C# I always separated my web...
6
by: Giovanni | last post by:
Hi, could someone explain to me the difference between php and netbeans? What one can do and the other not, and viceversa? tnx in advance
2
Paul NIcolai Sunga
by: Paul NIcolai Sunga | last post by:
i have a project in my java programming and database class we are bound to connect the database and the java netbeans programming language its just that i am so confused about the statements cause...
1
by: sokeefe | last post by:
I am trying to edit the GUI of a project in Netbeans. In particular, I am trying to add new JButtons. I get a NullPointerException when I try to add an Event to any given JButton (even ones that...
0
by: AlarV | last post by:
I'm programming with GUI in Java Netbeans and I want to create a pop-up window that runs at the beginning of my program, asks for the date and reads it from the user. What kind of Container should I...
3
by: miss peaches | last post by:
I am currently enrolled in a Java Programming Class in which we were asked to create a Class to store and retrieve an employee's name, hourly rate, and hours worked. Use constructors to initialize...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.