icons

how to create own file with icon that inherit from JFrame icon, that I set it, in java and my own file use FileOutputStream and ObjectOutputStream

若如初见. 提交于 2019-12-17 10:02:55
问题 I want to create my own file with icon that inherit from JFrame icon, that I set it, in java and my own file use FileOutputStream and ObjectOutputStream try { ObjectOutputStream oos; //I create own file with own extension in drive D: FileOutputStream fos = new FileOutputStream("D:/myFile.ckl"); oos = new ObjectOutputStream(fos); //Write Document in JTextPane to File oos.writeObject(jTextPane.getStyledDocument()); oos.close(); fos.close(); } catch (Exception exp) { JOptionPane

How to change executable jar file icon?

和自甴很熟 提交于 2019-12-17 09:40:05
问题 I have been able to change the runtime icon using this example like this getFrame().setIconImage(Toolkit.getDefaultToolkit().getImage(getClass() .getClassLoader().getResource("MyProject/resources/myIcon.png"))); but is there a way to tell NetBeans to use myIcon.png for the executable jar file (MyProject/dist/MyProject.jar) icon? 回答1: A launch wrapper is the solution, I use launch4j, a cross platform lightweight wrapper launch4j website 回答2: You may use JSmooth to create executable java file

Customizing Tree.collapsedIcon for a single JTree

倖福魔咒の 提交于 2019-12-17 07:53:13
问题 I know that you can change the Tree.collapsedIcon for a all JTrees in an application using Swing using the UImanager . For example: UIManager.put("Tree.collapsedIcon",closedcabinet); I would like the flexibility of changing the Tree.collapsedIcon for individual JTrees in the same application with the end result being that the Tree.collpasedIcon could appear differently for different trees in the same application. I know how to customize individual icons using a custom renderer. For example, I

Change pinned taskbar icon (windows 7)

柔情痞子 提交于 2019-12-17 07:13:20
问题 I wan't to customize the icon displayed within the windows 7 taskbar. When my app is running, I can do it by changing main window icon but, when the app is pinned, the exe's icon is displayed. How can I set the taskbar icon for my app to an icon different from the one embedded within the exe ? Not tried, this solution may work but looks dirty. Edit : Our app is compiled once but depending on config file, features are enabled or not so it's a product or another. We do not want to compile one

Change pinned taskbar icon (windows 7)

我与影子孤独终老i 提交于 2019-12-17 07:12:51
问题 I wan't to customize the icon displayed within the windows 7 taskbar. When my app is running, I can do it by changing main window icon but, when the app is pinned, the exe's icon is displayed. How can I set the taskbar icon for my app to an icon different from the one embedded within the exe ? Not tried, this solution may work but looks dirty. Edit : Our app is compiled once but depending on config file, features are enabled or not so it's a product or another. We do not want to compile one

How to set a picture programmatically in a NavBar?

孤人 提交于 2019-12-17 06:57:49
问题 I have a detailview with a navigation bar with a back button and a name for the view. The navigation bar is set programmatically. The name presented is set like this. self.title = NSLocalizedString(name, @""); The name depends on the presented view. Now I would like to also present a small icon on the navigation bar which also is depends on the view. How do I do that? 回答1: You can set backGround image to navigationBar Using this Put in didFinishLaunchingWithOptions [[UINavigationBar

Change icons of checked and unchecked for Checkbox for Android

China☆狼群 提交于 2019-12-17 04:22:47
问题 Instead of having a check mark for the icon, I want a custom star (I have checked and unchecked icons). Can this be done through a property? Or must I declare a custom widget that derives from Checkbox? 回答1: Kind of a mix: Set it in your layout file :- <CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="new checkbox" android:background="@drawable/checkbox_background" android:button="@drawable/checkbox" /> where the @drawable/checkbox will look like

How to hide the Dock icon

走远了吗. 提交于 2019-12-17 04:12:14
问题 I want to make a preference for hiding the Dock icon and showing an NSStatusItem . I can create the StatusItem but I don't know how to remove the icon from Dock. :-/ Any ideas? 回答1: I think you are looking for the LSUIElement in the Info.plist LSUIElement (String). If this key is set to “1”, Launch Services runs the application as an agent application. Agent applications do not appear in the Dock or in the Force Quit window. Although they typically run as background applications, they can

How to hide the Dock icon

老子叫甜甜 提交于 2019-12-17 04:12:08
问题 I want to make a preference for hiding the Dock icon and showing an NSStatusItem . I can create the StatusItem but I don't know how to remove the icon from Dock. :-/ Any ideas? 回答1: I think you are looking for the LSUIElement in the Info.plist LSUIElement (String). If this key is set to “1”, Launch Services runs the application as an agent application. Agent applications do not appear in the Dock or in the Force Quit window. Although they typically run as background applications, they can

How do you change the Dock Icon of a Java program?

Deadly 提交于 2019-12-17 03:41:14
问题 How can I change the Dock Icon of a program, in Java, on the Macintosh platform? I have heard about using Apple's Java library (that provides some sort of extra support on the Mac platform), but I have yet to find some actual examples. 回答1: Apple eAWT provides the Application class that allows to change the dock icon of an application. import com.apple.eawt.Application; ... Application application = Application.getApplication(); Image image = Toolkit.getDefaultToolkit().getImage("icon.png");