473,657 Members | 2,800 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JMenu with Icon

144 New Member
hi,

is it possible for each of the JMenu in my app have an icon. or is there any workaround?

thx
Nov 27 '07 #1
2 5659
JosAH
11,448 Recognized Expert MVP
hi,

is it possible for each of the JMenu in my app have an icon. or is there any workaround?

thx
Sure, no workaround needed because a JMenu *is a* AbstractButton it inherits
its setIcon() method.

kind regards,

Jos
Nov 27 '07 #2
thesti
144 New Member
hi,

thx for your great help Jos.
Nov 27 '07 #3

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

Similar topics

0
2849
by: Alex Ostrikov | last post by:
Hello, all !!! I have JFrame with JTabbedPane and JMenu. Each tab of JTabbedPane has JApplet on it. And when I choose any menu item (File -> DoSmth), my JApplet covers the part of menu so that it' not visible. Looks like applet is above the menu and covers it's part. I cann't get what the problem.
1
1834
by: - | last post by:
there is a "public JMenu add(JMenu c)" method in JMenuBar. i'm not good in programming and am wondering whether someone can provide me with a clarification why Sun chooses to return a JMenu, rather than a boolean or simply a void? returning a void won't be useful in determining whether it is added hence that is understood. in what scenario does returning the JMenu?
2
9439
by: Vic | last post by:
I am trying to change an icon associated with my application's main form and the application itself. 1. I selected my main form in IDE "Solution" tab and went to "Properties" window. 2. I found "Icon" property, browsed for and selected a new icon. 3. I noticed the icon changed on my form 4. Ran my application and sure thing, the new icon replaced the default .NET icon.
4
3726
by: Terry | last post by:
There are a number of things about using unmanaged resources in Windows Forms programming that is unclear to me. In C++, if you loaded an icon resource using "ExtractIcon()", the resource was valid until you called "DestroyIcon()". If you didn't, you had a leak. In C#, I need to load icons from unmanaged programs (.exe, dll) at run time and I want to make sure I'm not leaking resources, but it's not clear to me how to insure that I'm...
8
2275
by: Adrian | last post by:
How do I put an icon on a form using code? Thank you.
2
2813
by: Dickyb | last post by:
Extracting an Icon and Placing It On The Desktop (C# Language) I constructed a suite of programs in C++ several years ago that handle my financial portfolio, and now I have converted them to C#. The only significant problem that I have encountered in the conversion is this one - extracting an icon from the 'KTEntryPoint' program into the software suite and placing that icon on the PC Desktop.
14
2135
by: Kishan Hathiwala | last post by:
Hi i have kept a statusbar in the form with panels = true. and total there 3 panels. whenever i click on the 3rd panel a menu appears showing online and offline and either is enable at a time. once i clic on online its icon changes to connecticon (assume its there) and whenever i click on offline, its icon changes to disconnection (assume this is also there). now the problem is i have kept one icon for connection (ie when its online -...
5
3159
by: IcingDeath via DotNetMonster.com | last post by:
I am building this SQL Server database app in which i can store files. In order to display files I want to have the app show the associated icon for the extension of the file that is in the database. Therefore the file doesnt really exist on the user's hard drive. All the file extracting techniques require that I have the actual file on the drive in order to get an icon for it. There is a workaround for this: i could create dummy files with...
3
2847
by: Nina | last post by:
Hi there, I assigned icon for a window's form using form's Icon property at design time. Now I want to change the icon. I tried to replace the old icon with the new icon using form's Icon property. Somehow in the form's property window's Icon property has changed to new icon, but on the form it still uses the old icon. Then I tried to set Icon property to None, and it doesn't allow me to do it. I don't know why and how can I fix...
0
8316
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8833
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8610
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6174
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5636
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2735
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1730
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.