How to add SwingX palette in Window Builder? - java

I am using Windows Builder Pro in my Eclipse Helios. In NetBeans I know how to add SwingX palette. How can I add SwingX palette in Windows Builder?

If you right click on an entry in the palette, you can open up the Palette Manager, then "Add Category", and "Add Entry" or "Import Jar".
Also, if you just add whatever component you want (ie: JXTable) using Custom, it'll automatically show up in a Custom category in your palette.

A cleaner solution is simply to add both swingx-all-1.6.4.jar and swingx-beaninfo-1.6.4.jar to your build path.
Then, in the palette manager, import the swingx-all-1.6.4.jar, selecting all items.

Was playing around with it, and I have the solution.
SwingX ships in 2 jars- swingx-all-1.6.3.jar and swingx-beaninfo-1.6.3.jar, the second one contains BeanInfo classes. These are necessary if you want to import them as java beans in any IDE. So you need to merge them into a single library.
Here's what worked for me:
Make a directory called swingx.
Change to it, and unjar swingx-all-1.6.3.jar. Make a backup of META-INF/MANIFEST.MF, say to ../backup.mf.
Unjar swingx-beaninfo-1.6.3.jar to the same location. Its manifest will overwrite the previous one, hence we needed to backup.
Make sure you're in the same directory where you extracted the jars, and create a new jar that combines both of these, using the following commandline:
jar -cvfm swingx-combined.jar ../backup.mf *
This will create a fresh jar that has both the manifest (which lists all java beans within the jar) and the required BeanInfo classes.
Import this jar into WindowBuilder and you'll be able to add the required SwingX beans from it.

I was unable to add to the pallete. But, if you add the component in the source code it apears at the preview. Then you can drag it as if you got it from the pallete.
I hope it helps. Helped me...

First of all download SwingX 1.6.4 All -sources and SwingX 1.6.4 BeanInfo -sources from https://java.net/projects/swingx/downloads?search_tag=swingx-all-1.6.4.jar+&commit=search
and then add these jars to the elipse by going to project->properties->Add External JARs.

Related

Eclipse seems to think the CSS files are Java source code

I'm using Eclipse Eclipse IDE for Java Developers [Version: 2018-12 (4.10.0)
Build id: 20181214-0600] to develop a JavaFX project but I got some problems.
After a Java update, I've found several errors in my CSS files. Eclipse seems to think the CSS files are Java source code, as figured in the image below.
When I drag the mouse on a error, the description is "Syntax error on token 'Invalid character', interface expected" (because of # symbol)
I'm sure the code is correct because there are no errors before the latest java update to version 1.8.2.
Anyone can help me?
Most likely what happened here is what #Gianpio Benincasa said: You've created a new class, then in the file explorer you renamed it.
However, it's worth checking this one: Go to window/preferences, type 'associations' in the filter box to quickly nav to setting General>Editors>File Associations, and scroll through the file types list for *.css. Click on it, and check which editors are associated with it.
An eclipse with no particularly relevant plugins should only list 'Text Editor', and it should be marked as default. If you added plugins specifically for editing CSS, those will also be listed (and one of those is now probably default instead). Perhaps you or someone else went out of their way to add the java editor to this list somehow. If that is the case, simply make 'text editor' the default again (click it, click 'default'), then click on the java editor, and click 'remove'.
for eclipse that is a java class, in fact the icon has the "J". Probably when you created it you have created a new class and then have renamed it.
Create a new generic file instead a java class and copy the contents to the new file.
For create a generic file, rightclick and follow new-> other-> General-> files
Have a nice day

How to import elements from an external java library to AnyLogic workspace (palette)?

In eclipse we can import the elements of a jar file to palette and use them in designing GUI. I was wondering if we can do the same thing in AnyLogic?
I have added a java library (JCalendar for example) to the dependencies of my model. I tried to add it as a library object class using the "Manage Libraries" option in the palette view. When I add the Jar file it gives me this error:
Error while opening the library:
Invalid library format. Library description is missing.
Is there a way to fix this error?
If not, how can I use the external library elements in my model? How to know which element of the controls palette to use to pick up the data?
AnyLogic libraries can only be libraries you created with AnyLogic.
In your case, create a new model and empty agent class. Drag a JCalendar instance into the new agent class.
Then, you can turn it into an AnyLogic library as below:
In your real models, you can now add the library through "manage libraries" and drag and drop your object.
Do check the help on this as well, you can do some neat tricks with your own libraries.

How to hide unnecessary files from intellij project view?

Given a sample gradle project with project structure as shown:
As you can see there are bunch of stuff you actually dont ever need to see in idea but you need them to exist...
I know about ignored file/folder types under Editor/File Types but those are affecting the libs and projects, idea will ignore them everywhere while i only need to hide few unnecessary entries in project view.
Primary question : how do we hide them from project view?
Also for very big projects somethimes it is easy if some related modules are shown one after another... but do not do like that alphabeticaly.
Secondary question : is it possible to have customized order in project view?
I'm using Intellij 15 EAP IU-142.5047.6
Usually I use the Scopes support for filtering out/in elements.
I like this support and it can be use as the scope for other tool windows such as Hierarchy Call, and Find in path dialog. Moreover you can have many scopes and easily switch between them. The support for scratch files and version control - change sets - benefits from scopes support.
In order to create a new Scope:
open Settings > Appearance & Behavior > Scopes
Create a new scope by clicking on + icon
and then use include/exclude (recursively)
Kind regards
In IntelliJ, version 2022.1.3 Ultimate Edition:
Settings -> Editor-> File types
select "Ignored Files and Folders" tab
Click on the "+" sign to add the file extension to be ignored (files with this extension will not be displayed in the "Project" view).

Installing SwingX in Netbeans

I have problem installing SwingX in my Netbeans IDE. I want to play with JXPanel and related components but i could not get right library and get it going.
I tried to download swingx.jar but there is no valid link available in internet. I somehow managed to download swingx-1.6.jar, swingx-beaninfo-0.9.7 and swingbean.jar. I imported these jar files into the new library i created "SwingX" using tools->library and after that went to tools->palette->Swing/AWT Components and added a new palette group called SwingX and added the created library (SwingX) into it. Now i get a block in my IDE as shown in the figure.
Picture 1
Then i added the library into my project which is shown in the picture 2 and when i tried to insert JXXollapsiblePane from the pallete group into a JFrame i am gettign the following error shown in picture3.
Picture 2
Picture 3
Add swingx-1.6.jar to your project instead of swingx-beaninfo-0.9.7

How to import existing project into Workplace in Eclipse?

I am trying to follow Eclipse instructions to create a Hello World SWT application. I have the following instruction:
Import the SWT project from the main
menu via File > Import..., and select
Existing Projects into Workspace.
Specify the archive file you
downloaded and click Finish. This will
create the org.eclipse.swt project
which we will need to compile and run
the application.
I have troubles with that. In the "File" menu I see "Import...". When I click the "Import...", I do not see "Existing Project into Workspace". Instead of that I see "Select an import source:" after which I see a text field. After that I see a field with the following folders: General, CVS, Run/Debug, Tasks, Team, XML.
Can anybody help me with that, pleas?
You need to expand General.
If you expand the 'General' node (folder) you will see 'Existing projects into workspace' as an option. Select that and click on Next.
Eclipse has the wonderful search functionality on most of its important screens. Even if you don't know where exactly it is, you can type it and it appears. In this case type "Existing" into the text field above the list and you'll see what you are looking for.

Categories