how to add file chooser to swing GUI form Palette components IntelliJ IDEA - user-interface

I already developed an application that train some text files in order to creat a data model which i will use in another class to identify the language of the document.
For now i have written and finished writing two classes one for Training the data models and the other to identify any given document language.
I wrote the code that i can get the file paths as arguments to my main method in order for the user to pass the file names as arguments to my main method.
But now i decided to create a simple GUI form for the application and i need the file chooser But when i choose the GUI form i could not find the file chooser from all the Swing palette components available.
How can i add it?
Note: i am using IntelliJ IDEA 13.0 Ultimate.

File chooser is something that usually pops up based on some button click.
So, what can you do is, inside button listener make an object JFileChooser and play with that.
fc = new JFileChooser();
fc.showOpenDialog(parentPanel);

Related

MFC:CDHtmlDialog Purpose/Usages to open other views?

I was thinking of writing a new app where a users selects an option of what procedure they want to perform and the view changes to that until done then goes back to the main menu. I came across CDHtmlDialog and looked like a nice easy way to add a nice looking menu using html. But I wonder if that is the purpose of that class? Can I set it up so when a button or graphic link is clicked it changes out the view to another one (I would need to use traditional things like CTreeView with CListView with a splitter) or is it more for staying within the HTML world?
Thanks.
From the MSDN MSDN documentation
CDHtmlDialog Class is used to create dialog boxes that use HTML rather than dialog resources to implement their user interface.
From what I can gather from your post, I think you should consider SDI application using view classes that you want. To switch views on the command you do not need a splitter window. A static splitter is used to display a number of views in a different part of the splitter simultaneously.

Design forms in VC++

Till current moment I knew only one recipy to create form VC++ designer:
1. Add dialog resource and design what you want in designer.
2. Create MFC form by using designed dialog resources
But now I got project sample that has form and has no *.rs files with form information. Instead of that it has header file that has form icon. Header file contains many code that creates controls and sets style. It is also possible select from menu "View Designer". That makes me think that there is another way of creating form. Besides that looks that codes does't uses MFC.
How to create simple form application with designer that would generate header file (not resource) and not use MFC?
Unfortunately I can't "View Designer" because during this procedure error is generated:
C++ CodeDOM parser error: Line: 1520, Column: 42 --- Unknown type 'AxKgLib.AxKg'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built.
Correct me if I'm wrong. Looks like I need registered ActiveX for this project. I have registered ocx that was included in source, but this didn't helped.
How to solve this problem? How to get list of all ocx that system has to make sure there is no required AxKgLib.AxKg? How to make designer to show me form without required control?

How to change InstallShield controls properties dynamically?

I have a custom dialog in my IS installer and I want to change some properties such as Height, Top etc. according to the text written in the text areas (on run-time).
Are there any InstallScript functions that handle those parameters (something like CtrlSetText for changing the text)?
Assuming you are using a Windows Installer project type, you can use temporary tables and data. If you understand the underlying table schema you can use InstallScript to write a custom action that changes this during the installation. For starters see:
Q103295 : Dynamically Add and Remove Values from a Combo Box at Run Time

is it possible to create a Form that will be used by a T4 template

I was wondering if it is possible to create a form that will be run on the execution of a t4 template. I would like the values inputted into the form to be used by the template to generate code, similarly to add view in an asp.net mvc project i.e. right click add view and a form would appear to add a new view.
Also in the add view (example discussed above) would it be possible to edit the form that appears i.e. add a new text box?
Something similar can be done with MVC Scaffolding. Only difference is it uses Powershell as the "UI" and environment. Pretty powerful stuff, you can configure it via command line parameters. Part 5-6-7 contains customization/modification related informations.
http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/
No dialog boxes, and forms aout of the box, but powershell (and any command line) is pretty useful if you are a developer. You can queue up tasks, etc...

Adding controls to a Property Sheet at runtime (without Dialog Templates)

As far as I can see, the way you normally create Property Sheets in Win32 (I am using the API, not MFC) programming is you have a bunch of dialog templates for each tab page, and you make the property sheet out of them. I have read about creating Dialog Templates 'in memory' but I would prefer not to do it this way. How do you add controls to a Property Sheet programatically at runtime, just like you can create a BUTTON and add it to a Window at runtime?
I suggest that you create a blank template and link that to your app. You can then create the property sheet with CreatePropertySheetPage and then add and remove controls to that property sheet as you please.
If you absolutely have to use a template built on the fly in memory, and you can't bring yourself to link a resource to your app, then you need the DLGTEMPLATE structure.

Resources