Extended Swing Components into Custom Component Palette

Hi
As part of my swing application I have a number of GUI components created as an extension of a normal swing component.
As example is below.
package com.myapp
import java.awt.Font;
import javax.swing.JLabel;
public class MLabel extends JLabel
public MLabel()
this.setFont(new Font("Tohoma",0,10));
this.setFocusable(false);
As you can see this simple sets some default attributes. How can I add this custom component into a palette for each access when using the GUI builder.
I've created a new page in the palette, but am unable to add my components.
Thanks for your help.
Nick.

Hi,
- create a JAR file with your component(s) in it
- Create a custom Library in JDeveloper (Tools--> Managed Libraries)
- Select the JAR file
- On the component palette (the page you created), select the properties option of the context menu
- Your library now shows up in the drop down list to choose the component to add
Frank

Similar Messages

  • Custom Component Palette

    Hi,
    I want to know how can I create my component palette with differents controls. I want that my palette has several JSF components (JSF HTML and ADF Faces Core).
    For example, in my custom palette I have a Table (of ADF Faces Core), a InputText (of ADF Faces Core) and a PanelGrid (of JSF HTML).
    How can I do that? It is possible?
    Thanks
    Diego

    In Tools -> Configue Palette I can only create Component Palette of the following types (css, java, oxd_usc and snippet), but I can't add JSF Components in this types.
    How can I add JSF components in this types?
    Or, which is the type (css, java, oxd_usc, snippet or other) used for add JSF components?
    Thanks
    Diego

  • Extending Swing Components

    I would like to create my own Swing components that I wish to use in my Java GUI programs. I would like to create my own lightweight components and also to create things such as:
    Round buttons
    Sliders
    etc
    I also need to know how to create metallic skins for my Swing application.
    Please can someone give me any simple examples of how to create custom components and also how to create skins of interfaces or give me some URLs that teach you.
    Thanks in advance
    Riz

    I think your best bet is to look at the source of the LookAndFeel's provided with the swing download, mac/windows/motif/metal/basic and figure it all out. I don't know of any detailed sites to help make look and feels.

  • Converting swing components into some readable format

    Hello all,
    A requirement for the application I'm writing is for it to email automatically generated reports to various clients. My problem is that I'm not sure what would be the best format to send the reports. The reports are attached to the email and the sent via JavaMail.
    I have 2 modes of thought at this stage:
    1. Convert a Report (Printable Swing component) to HTML and either attach this or embed it in an email. Question here is how do I convert the Report to HTML?
    2. Print the Report using Adobe Distiller. Once the pdf is created, attach it to the email and send. Problem is that it's unlikely that other users of my software have Distiller. Any Swing to PDF packages that anyone knows of?
    To give you some idea of exactly what I'm doing, please look at the following 2 links.
    1. A screen shot of the Report:
    http://www.genepi.waimr.uwa.edu.au/radar/storage/report.jpg
    2. The Report after it's been printed with Distiller:
    http://www.genepi.waimr.uwa.edu.au/radar/storage/report.pdf
    Note: The previous files will be removed from the server in a couple of days.
    Also, I'm open to any other suggestion! So if anyone has a good idea, please post it!
    Thanks,
    Muel.

    Thanks for your reply.No problem. Interesting problem, as a matter of fact.
    Those reports are created dynamically from querying a
    database. A Report itself is a JDialog, the
    content-pane of which uses a custom LayoutManager.
    The LayoutManager controls a Book and decides whether
    or not to add JLabels to the current ReportPage (a
    Printable JPanel), or to create a new ReportPage and
    add them to it.This is where I don't quite agree with your approach. I don't know if you're familiar with the MVC concept because this is typically the issue you're dealing with here. I hope I'm not misinterpreting what you said but it seems you are storing the content of your database query directly in a particular View (a violation of the MVC principle).
    What you need to do is create a true Model which will hold the logic of what your Reports really are. From what I understood with your image, this class should contain member variables such as addresses, a title, funny notes ;) ...
    Displaying your report in a JDialog is all about creating the most appropriate View for that Model. Using a custom document with its own LayoutManager, JLabels... is, IMHO, a very pragmatic, convenient choice. It is not the only possible choice however. What if, in the future, you wanted to allow the user to copy / paste the report outside your application ? What if, you wanted to allow him/her to edit it prior to printing it?
    Your other requirements involve a printable version of your report and one that can be sent by email. It turns out that HTML is a good pick. Personally, I once had to print HTML and the advices I found at http://www.fawcette.com/javapro/2002_12/online/print_kgauthier_12_10_02/ were quite precious (paging is nicely handled). Moreover, sending html in a mail is piece of cake.
    All it comes down to is how to produce that HTML. Forget about my suggestion of creating a StyledDocument. It might work but writing HTML directly is much faster and easier. The only real constraint here is that the produced HTML should be 3.2 valid. In your case, this serialization should be conducted on the Model, NOT on the View.
    I forgot to mention that once you'll have produced that "html report writer" class, you'll have to reconsider using a JTextPane for your Report display JDialog.

  • Component palette "inactive"?

    Hello all,
    (W2K Professional and JDeveloper 9.0.3)
    I need to use some UI Swing components and
    my component palette always appear inactive
    can anyone advise how to change it from such
    status of Palette Inactive? I have not yet found the
    option "Activate Palette" this is somehow crazy.
    Thanks in advance,
    Best Regards,
    Giovanni

    Hi Giovanni,
    the component palette should become avtive, when you right click on you class (java file) and select UI editor. You have to give this window the focus. It should work. ;-)
    Regards,
    Axel

  • Component Palette

    Does JDeveloper 10g have the provision to register
    custom schemas for the Component Palette?
    For example,
    1. Create a Component Palette page of type XML with
    Tools>Configure Palette.
    2. Add Components to the Component Palette from a
    custom schema.

    Deepak,
    Are you hoping to add pages to the Component Palette to aid in the editing of a custom XML language using the JDeveloper XML Editor? If so, and you have an XML Schema, all you should have to do is register it with JDeveloper via Tools .. Preferences .. XML Schemas, using "xml" as the extension. Then when you open a document that uses your schema, you should automatically have a component palette, plus get code insight, support in the Property Inspector, insertion menus (right-click in the Structure Pane), etc.
    -brian

  • Embedding Swing Components within Javafx Scene (on a Mac)

    Currently I trying to embed swing components into javafx through steps located here: SwingNode The Myth not the reality | In-SideFX
    Was able to get it working on a PC, however when the packaged jar is run on a mac, I end up with the "Headless exception"
    "Process manager already initialized: can't fully enable headless mode." (error attached below)
    Currently using java 7 update 51, using java 8 is not an option unfortunately.
    Does anyone know of a work around to get this working in mac or possibly point me in the right direction?
    Please let me know if providing other things would help. Thank you in advanced!

    Currently I trying to embed swing components into javafx through steps located here: SwingNode The Myth not the reality | In-SideFX
    Was able to get it working on a PC, however when the packaged jar is run on a mac, I end up with the "Headless exception"
    "Process manager already initialized: can't fully enable headless mode." (error attached below)
    Currently using java 7 update 51, using java 8 is not an option unfortunately.
    Does anyone know of a work around to get this working in mac or possibly point me in the right direction?
    Please let me know if providing other things would help. Thank you in advanced!

  • How do I add ADF Faces Core and ADF Faces Html to the component palette?

    I have an already made jspx page which I wish to work further on but I can´t choose ADF components from the component palette.
    in my older version I added these two lines to the <jsp:root> element when I wanted to make ADF components available.
    xmlns:af="http://xmlns.oracle.com/adf/faces"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    but in Jdeveloper 11g preview 3 these two lines seem to have no effect.
    I tried to see what other jspx pages that contained ADF components in 11g had that my page didn´t and found out that they had the line
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    but when I add this line instead of the other two lines and press install JSP tag library Jdeveloper freezes completely. Can anyone help me get ADF components show up in the component palette in Jdeveloper 11g preview 3?
    Message was edited by:
    AtlanticViking

    Hello,
    Jdeveloper 11g uses Trinidad not ADF Faces 10g, to add it, uses the following:
    1. Double-click your project to access project properties;
    2. Select JSP Tag Libraries;
    3. Click Add;
    4. Trinidad Component 11-m3
    Regards,
    ~ Simon

  • JDeveloper Component Palette

    I just installed Jdev3.0 and all components on the Component Palette Toolbar turn red on mouseover and you can't tell what they are.
    This is a Compaq 450 Desktop. I even installed on an other machine of the same type and it still happens.

    The setting on my machine are 256 colors and 1024 by 768 pixels.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDev Team ():
    Hi,
    We have seen some problems with colors and the JDK1.2. Can you tell me what the color settings and resolution are on the systems where you see the problem?
    Laura<HR></BLOCKQUOTE>
    null

  • Extension which will provide Custom Soa components from component palette.

    I was asked to created an extension which will aid in helping the development faster and enable following standards strictly.
    So I have to create an extension which will add the following functionality.
    I have to add custom components in component palette which can be dragged dropped in composite editor similar to that of JMS Adapter extra.
    So Can you please look into the requirement and give me some pointers.
    Update: I was able to add a custom component to the component palette with the help cppageprovider example. But the component does nothing.
    I want to know how the drag and dropping is done.
    How to extend BPEL designer to add my own activities palette icon/item? I am stuck at exactly the same point as his.
    I know it is difficult to get an answer during christmas! But I have deadline. :(
    Edited by: Ramasamy gopalan on Dec 26, 2011 11:22 PM
    Edited by: Ramasamy gopalan on Dec 27, 2011 2:08 AM

    Hi,
    while it is JDeveloper owning the extension framework, unfortunately we do not own the composite editor. I'll try and forward your question Oracle internally, but I have no direct access to the developer of the SOA editor extension. I deally you also continue posting to the SOA forum
    SOA Suite
    Frank

  • Problem with showing palette component which contains swing components

    hello, I have found a simple problem with jdeveloper IDE but this simple problem delays my project and it make late a big project so help me please. I want to add somes swing components to a JFrame
    but when I try to show the palette component as usual I didn't find the swing components like habit.
    Best Regards

    duplicate
    Frank

  • How to include multiple image components into a single custom component???

    How to include multiple image components into a single custom component???

    Hi Marcel,
    an ABAP transaction can only run or at least be started on one single system. A portal transaction can be assigned using a URL. This doesn't need any logical component.
    Regards
    Andreas

  • How to get an event both in custom component and into its instance

    I have a custom component that extends a Jtree
    I want to know when a node is clicked both , into my component and after into the component sited into Jpanel
    now, I can only detect it into the component, but I dont know how to detect it at the component I have in my Jpanel
    I have 'addTreeSelectionListener' in both places ...
    xxxxx.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
    public void valueChanged(javax.swing.event.TreeSelectionEvent e) { .....
    Any help ?
    Thanks

    tonnot wrote:
    Thank you.
    I think that a good answer can be ' Revise your code, because there must be a problem' Well, that's the life of a programmer. If you want to post an SSCCE, I'm sure somebody can help if you get stuck.
    And ...
    Why are you extending JTree? I'd bet you shouldn't be.Why not ? ....
    Why SUN develop the 'extends' functionality ? You should use extends if you're changing the behavior of an existing class. An example of this is extending JPanel and overriding the paintComponent() method to do some custom painting.
    You should not use extends if you just need an instance of an existing class. An example of this is extending JFrame instead of simply creating a JFrame instance.
    Without seeing your code, I can't be sure you're misusing extends. But many people do.
    Here's an example.
    Bad:
    public class MyProgram extends JFrame{
       public MyProgram(){
          setSize(200, 200);
          setVisible(true);
       public static void main(String [] args){
          new MyProgram();
    }Better:
    public class MyProgram{
       public MyProgram(){
          JFrame frame = new JFrame();
          frame.setSize(200, 200);
          frame.setVisible(true);
       public static void main(String [] args){
          new MyProgram();
    }

  • Showing swing components in the palette og jdeveloper

    hello, I have found a problem with jdeveloper, as a user uses jdeveloper since 2 years I have never found a problem like this. (IDE problem).
    like habitude I created a simple java project which contains a jframe and an entry class (main class), but when I try to drag and drop from the component palette somes swing components I didn't find
    the page of swing components ( I found in the components palette just "my components" page in the jcombobox selection category). this problem will delay a big project and causes big problems
    please any person who know some things help me as soon as possible.
    Best Regards.

    Check this post -
    showing palette containing JButton,JLabel,JPanel ... components

  • Nesting JSF components in a  custom component

    I'm creating a new JSF custom component. my component needs to include an input text and a list box. my question is : how do I add these components to my JSF component ? I want to use to JSF component to render them rather then encoding the HTML myself. how can I do it ?
    I was told I need to use encodeChildren method somehow but I don't know how ?

    I finally found how to set a default skin to a custom component so that users of my component will not have to set again the skinClass value of my component.
    You have to create a defaults.css file at the root of your library and tell the compiler to take it into account.
    The remaining problem is about the compiler. There are some steps before success and they are a bit mysterious/unclear....
    I found 2 or 3 blog articles explaining those steps but the compiler arguments to use are all differents in each article...
    Here are the links I found:
    http://www.unitedmindset.com/jonbcampos/2010/05/12/creating-custom-spark-components/
    http://www.betadesigns.co.uk/Blog/2010/05/14/default-skin-for-custom-flashbuilder-componen ts/
    http://flexdevtips.blogspot.com/2009/06/default-stylesheet-in-swc-flex-library.html
    Following the first article guidelines has been successful for me but I'm not marking this topic as Resolved because I'd like some answers about this whole thing...

Maybe you are looking for

  • How to relocate OS X system files to boot off another internal drive?

    Hello, Apple forums! Currently I have a 120 GB SSD installed where the optical drive was in my MacBook, and Mavericks resides on that. I have a second, larger, internal disc I use to house projects, and audio samples (for music production). Recently,

  • I need help identifying a part in my Creative Zen Vision M pla

    Hi, I was having trouble with my CZ, so I opened it up and I forgot to take the battery cord off the other side of the player and hence I broke the little tan color piece. I was wonder if this was fixable? I tried glue but that didn't work. Here is a

  • Controlling Wi-Fi

    Does anyone know how to permanently disable the Wi-Fi on an iPhone or iPod touch? I know how to temporarily disable it (tap on "Settings", then tap on "Wi-Fi" and slide the bar to "Off"). Is it even possible to disable it permanently? Alternatively,

  • Saving text written in a string indicator on the front panel

    Hi, As a new LabVIEW user I'm trying to type a manual to explain how to use the software program I'm writing. I would like to display it on the front panel in one of the tab windows. There is quite a lot of writing and I would like the user to be abl

  • Ipod touch desactivado y en  modo avion

    Tengo un ipod touch desactivado y en  modo avion por olvido de clave, como lo desactivo de modo avion para que itunes lo reconozca??