Hi puce ,how to make an editor having swing components

hi puce please tell me how to make an editor having drag and drop facility and when after dragging and dropping components on a page save the page. The page saved should be stored in xml format and i want this application to be stand alone .. please help... ihave seen ur customizerbarsample.java ..It helped but not fully ....how after resizing and move i can get current coordinates

Hi,
Sir , what i would like to know is like in
Customizerbarsample.java you have taken
JLabelCustomizer and u drag and drop the label
similarly i would like to drag n drop other
components aswell and i would like to know what their
dimensions are like the x . y coordinates both
relative and absolute . also if after resizing i
would like to know absolute height and width ... how
should i go about it ... An example code would be a
great help.... Sorry, I currently don't have the time to provide you such an example. But where exactly do you have problems? I expect you're using the example from:
http://forum.java.sun.com/thread.jspa?threadID=737908
as a base.
That example shows that you can just create any TableModel you need and then create any Customizer you need from that in the consumeSelection-method.
How to get the information of the customizers (x, y,...) I just explained in the last response. Where do you have problems there?
i have read that if u need X, y
coordinates along with height and width i need to
register propertychangelistener along with
CustomizerListener...but how do u register both
these listeners and where.. E.g. at the place where you create the customizers:
myCustomizer.addPropertyChangeListener(...);
myCustomizer.addCustomizerListener(...);But what do you want to do with that? Maybe there's a better solution...
like u instantiated
JLabelCustomizer i tried to do the same with
JButtonCustomizer but there was an error saying
JbuttonCustomizer is abstract it cannot be
instantiated..... please helpYeah, I just had a look at JButtonCustomizer and it seems as it isn't ready to use yet (probably I added some abstract methods to a base class and then just declared it abstract to be able to compile it ;) ). You can still add buttons using JCustomizer - you just won't have the in-place editing feature. Or you might want to create your own customizer derived from AbstractTextCustomizer (check the JLabelCustomizer if you need an example).
-Puce

Similar Messages

  • How to make save and restore swing components?

    hi,
    i have a problem with serialization when i trying to save a class that extends JInternalFrame class.
    err i am getting is "java.bean.PropertyDescriptior : not serialized exception". how can i get rid of this problem.
    can anyone help me in this stage so that i can complete my project.
    thankx in advance.

    Make this class implement Serializable

  • How to make own editor and call it?

    could you please tell me how to make own editor and call it on a clicking of a push button corresponding to an test Item

    In the Object Navigator... just click on the 'Editor' Node and press the '+' (Create) button....
    Set then any properties as you like....
    So simple...
    Greetings,
    Sim

  • How to avoid multiple redraws of Swing components?

    I have this problem every time I work with swing components. For example, I am creating my own JCalendar. I have a combobox to change the month and two buttons to move to the next and previous months.
    Naturally when you press the next month button the combobox should by updated by the program to reflect the new month.
    The problem is, I redraw my JCalendar if the user changes the combobox and when the user presses a button. So when the user presses a button, I get the event from the button which redraws the calendar, and then I get another event as a result of the combobox being changed by my program. So I get two events, and two redraws of my calendar which tends to make it a little sluggish.
    Should I just remove my comobox listener temporarily when the user presses the "Next Month" or "Prev Month" buttons?
    I've encounted this type of problem before, so I must just have a bad design. Should I just create a method for JCalendar called update()? Tehn technically I could update the model of my JCalendar and not have the UI updated unless the user calls update().

    Why don't you do the redraw only when the combo box changes and not when the buttons are pressed. Since the buttons always change the combo box anyway. The buttons change the combo box and the combox calls the redraw.

  • How to make clickable hyperlinks in Swing?

    Hey all,
    I know that swing supports html tags, but is this only graphics?
    I'm asking coz i want to make a JLabel to have a hyperlink and when you click it, it should open ur browser and go the page.
    JLabel label = new JLabel("<html><a href=\"http://www.blah.gr/\">blah...blah...</a></html>");now it has a hyperlink look but when you click it, nothing happens.
    must i make the JLabel to implement a ActionListener?
    and code my way to open hyperlinks?
    any help will be appreciated
    thanks,
    avdzm
    Message was edited by:
    avdzm

    Implement a MouseListener and override in
    mouseClicked method.If you want the mouse pointer to
    be changed then override mouseEntered and mouseExited
    methods.What code would you put in the overridden mouseClicked method?

  • How to make a Multiple-rows Swing menubar?

    Hello!
    I'd like to le JMenubar to show multi-rows automatically in JFrame or JApplet if one row can not show all menus.
    Does anyone know how to do it? (I've asked several times these days but seems no one knows answer)
    Thank you very much.

    If your design requires that many menubar items that it can't be displayed on a normal window, then perhaps you should reconsider your design. If you really think it is your only option than you can try changing the layout of the menubar.JMenuBar mb = new JMenuBar();
    mb.setLayout(new GridLayout(5, 2));

  • How to print content of the swing components?Example:JTextArea.

    I have a application,it include a JTextArea,and when user click newfile menu,
    it will load a txt file.but how can I print the txt file content? now ,I can only
    print the panel of the application!
    Thank you!

    Next is the code of the PrintManager I have written. It uses the new Printing technique.
    package jippa.jshell.gui;
    import javax.print.Doc;
    import javax.print.DocFlavor;
    import javax.print.DocPrintJob;
    import javax.print.PrintException;
    import javax.print.PrintService;
    import javax.print.PrintServiceLookup;
    import javax.print.SimpleDoc;
    import javax.print.attribute.HashPrintRequestAttributeSet;
    import javax.print.attribute.PrintRequestAttributeSet;
    import javax.print.attribute.standard.MediaSizeName;
    * @author postma
    * To change the template for this generated type comment go to
    * Window>Preferences>Java>Code Generation>Code and Comments
    public class PrintManager {
         * Constructs a new PrintManager.
         public PrintManager() {
              super();          
         * Print the given text.
         * @param text The text to be printed.
         public void print(String text) {
              DocFlavor df = DocFlavor.STRING.TEXT_PLAIN;
              Doc myDoc = new SimpleDoc(text, df, null);
              PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
              aset.add(MediaSizeName.ISO_A4);
              PrintService[] services =
                   PrintServiceLookup.lookupPrintServices(df, aset);
              if (services.length > 0) {
                   DocPrintJob job = services[0].createPrintJob();
                   try {
                        job.print(myDoc, aset);
                   } catch (PrintException pe) {
                        pe.printStackTrace();
    In your code you must add:
    PrintManager pm = new PrintManager();
    pm.print(text);

  • How to improve the Performance of Swing Components

    Hi
    I have developed a GUI Framework with Swing components. I observed that when number of components are more, the GUI is slow. Could anybody suggest me the ways to improve the performance of Swing Components
    Thanks

    Hi There - I haven't found issues so far with the speed of the GUI building, it seems fast when compared with .NET applications
    Are you doing any database querying on form load? This can slow down the loading of the GUI, I use persistence in an application and before the GUI is shown the persistence unit logs in to the database and registers itself - it does take 2/3 seconds to register and complete whatever it does before the form builds and shows
    Also check if you are loading/using any network based files on form load, this can also slow down the building considerably as well. Apart from that it's hard to say where your issue may lie apart from removing controls and checking build speed until you find the one that's slowing it down (not a good approach though) I sometimes had to load csv files from a network drive and if the file server is slow or LAN speed isn't great this can also cause a delay, hope you find it.....

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • Hey guyz can u help me out on how to make an apple ID on iPhone 4s without having a credit card information

    Hey guyz can u help me out on how to make an apple ID on iPhone 4s without having a credit card information

    http://support.apple.com/kb/ht2534

  • How can I make the editor photoshop work

    how can I make the editor photoshop work? it can not work at all.
    please help me . thanks

    You need to tell us at least what program you are referring to and some system info...
    Mylenium

  • How to make a valve in control editor?

    I want to make a control function in Labview5.0,but I don't know how to make it,for example I will make a valve that is a control funtion,how to make it properly

    If you were to go to Search Examples>Demonstrations>Process Control>Control Mixer Process, you'll find a VI with several custom controls including a valve. All it is is a boolean with custom images. To make your own, use a drawing program like Paint and make images of your valve in the open and closed state. Place a boolean control on a VI's front panel and choose Edit Control from the Edit menu. Once in the control editor go to customize mode. Choose Import Picture From File from the Edit menu. Right click the boolean control and choose Picture Item to Replace to determine which picture to replace with the one from file (a boolean actually uses 4 pictures but you only need to replace the first two which are the true and false states). Right click again and
    choose either Import Picture or Import at Same Size. Repeat for the other boolean state with a different picture. You should save your changes as a .ctl so that you can easily use it again.

  • How to make feedback visible to all user having read permission

    hi,
        for a document , a user is giving a feedback. my need is how to make that feedback visible to all user. all user are having read permission only.
      help will be appriciated
    Regards,
    Shanthakumar.

    Hi,
    Normally we use feedback as an explanation by an approver to the previous approver about his action on the doc( reject/approve).
    I think you want ur users to view the doc and then give suggestions to make it better and these comments should be approved and then made visible.
    I replied on one such thread earlier too.
    Please have a look at this [thread|https://www.sdn.sap.com/irj/sdn/thread?threadID=816692]
    I hope it helps.
    Regards,
    Sumit

  • How to make a stationery out of .doc or .docx file?

    Hi,
    I stumbled upon a website that has some nice stationery, in .doc format. and since there few free pre made stationery available for Mail.app, at least to my knowledge, because I think I almost downloaded every free stationery available out there that could be easily found via Google. I decided to download some of these .doc stationeries and try to put them in Mail.app, but first I had to convert them into .html format. so here is what I've already tried and did not work:
    first I tried opening them in TextEdit, which supports .doc out of the box, only to find out that the pictures in the documents are gone to thin air. I tried saving it and then opening it with something else like Open Office, but the pictures were permanently gone.
    then I tried opening the original documents directly in Open Office, you guessed right If you said they will look screwed, and they were, and tried to save them as html, they were screwed even more.
    so I did a bit of research and found out that I could use Google Docs in order to convert the documents, I uploaded them into my Google docs and then tried to open them with it, but found it that Google docs can't handle the pictures (specially background pictures) either. as a result I did more searching to find a document converter and here is what I found:
    I found a few online service to convert these documents:
    http://www.freefileconvert.com/ was pretty good to convert the files into an .odt format. at first I thought yes I got the solution, now I can simply convert it to html using Open Office, but unfortunately, when I saved the document in html format and checked it in Safari to see how does it look, as If I would have done the same in MS Office with the original format, it looked pretty much screwed .
    So I continued to look and I found a few other online services one of them asked me to pay a fee, I skipped to the other one which was http://docx-converter.com/. unfortunately the website wasn't functioning properly I think, at least for me (maybe someone out there has succeeded using it, I don't know.) and it didn't send me anything.
    Finally I found http://www.zamzar.com/ that could convert .doc or .docx documents into html, or at least that is what it claims to do so, I tried it, and after I received the file via email, I found out it only contains a bmp image of the document's background. So much for the online conversion services!
    But I decided I would give it a last shot using MS Office online, so I opened up my old Windows Live mail and went into my Skydrive, I uploaded the documents and tried saving it as html, but there were no save as html (after all an online copy of MS Office should have some limitations, otherwise few people will be willing to buy a Desktop version) but this didn't made me disappointed, since I already knew, that Neither Office Word can make a clear conversion, so I tried something different, while I was in Safari looking at the document in online MS office, I saved the page as Web Archives, then I opened the file with TextEdit, and after deleting useless links and pictures, I finally managed to get a clear document with everything that supposed to be in it. At this point I only need to know how to make use of this document to create a stationery with this raw file which is in Web Archive format. any ideas?
    null

    I'm a total idiot! How did I overlook http://www.zamzar.com/ functions? I think I might have mistakenly chosen convert to BMP instead of html. I tried it and the result was very good.
    OK I finally found a good solution for this problem, so everyone out there that has the same problem, here is what I did:
    1. OK if you have some .doc and .docx file formats and you want to convert them into something like .html or .odt, without having to reedit the code or getting a screwed document, use http://www.freefileconvert.com/ in order to convert them into .odt so they would look as they do in MS office just go to the website and upload your documents then choose .odt, then click convert, after a few moments you will get a link to download your .odt files. you can use and play around with your document in Open Office, I have tested it and it's really good.
    2. Or if you want to convert them into .html with a clean code, and all the elements in it, simply go to http://www.zamzar.com/ and then ulpoad your documents, choose .html and enter your email address, you will have your .html files zipped and sent right in your inbox, then you could use Kompozer like me, or any other html editor, to make a template out of it. I tried it and the result was nice, now I have a bunch of nice html files that I can use to make templates and email stationery.

  • How to make table as "editable false"

    Dear Forum,
    i am user of jDeveloper jClient/Swing .jpr.
    cutomer table having following attributes-
    1.cust_id (primary key)
    2.cust_name
    3.cust_add
    Suppose customerview bind with jTable1.
    Using ViewObjectEditor, i set "updateable never" for all fields.
    This show error, when data insert into table " cust_id as
    read only".
    Help me, Using jClient Binding how to make Table as "editable false".

    Overriding method prepareEditor() for new table:
    private JTable tableList = new JTable(){
    public Component prepareEditor(TableCellEditor editor, int row, int column) {
    // 1 and 2 column is not editable
    if(column == 0 || column == 1){ return null; }
    return super.prepareEditor(editor, row, column);

Maybe you are looking for

  • How do I force Safari to remember site logins/passwords?

    Hi. I'm using a new Mini running Mountain Lion and Safari 6.0.5. I installed the computer fresh, rather than migrating from my old computer (2007 Mini), as I was dragging a lot of dead weight in settings, preferences, and cache. Safari DID acquire my

  • How to load external SWF used sharing library.

    Hi~~~ Before ask the question, plz understand my bad English.. Recently I try to load the Swf file that is maded by Flash CS 6.0. Especially it used shared library.. When I try to load this SWF, I used FileStream instead URLRequest. This is because t

  • Planned support for JAX-WS web services?

    Are there any plans for JDeveloper to support JAX-WS web services in the near future (https://jax-ws.dev.java.net/) I know that I can just import the libraries and develop code from scratch, but it would be nice if I could actually run the code in OC

  • Opening External File

    Is there anyway for Flash (within AS3) to open a vbscript or javascript file and then wait for a boolean value to be returned to Flash from that file? Is this even possible? Thanks for any help you can give me!

  • How do I stop switching to a new tab when I highlight something and right click "search google"

    So whenever a highlight a word and right click it to "Search Google for..." it switches to the new tab that just opened. How can I stop it? I've already tried going to Tools > Options > and disabling the thingie, but that only works for links that I