Opinion: new Package for every new custom Component?

Hi there,
I am just thinking of some possibilities to structurize my Components I made.
I wonder if it is useful/good programming to define a new package for each new custom Component?
So if I define a new MyComponent class extending JFrame should I make a new package:
"mycomponent"
containing these subfolders:
"view"
"model"
"controler"
subfolging "controler" in:
"listeners"
"adapters"
"events"
Is there any sense to do so? I think this would be the best way to structurize one's components.
But if you do, you have to include millions of packages if you want to use one of these components :(.
Please post, what you think.
Thank you
Sincerely
Karlheinz Toni

nope ;). I would most certainly not want to put every file in a single directory.
But I like sturctured things. If things belong to each other, it should be visible at once, that they have something to to with each other. And the best method I can figure you is putting them in one package.
The subpackages should be created, because of the model, that is used for all swing componentd (UI-delegete, MVC...) so that each structural component is where it belongs to.
I don't like it if tere are 100 events one object could possibly create and you don't know the events from the component (of course you can guess by the name Event :)), but if they are in the same package, you would have to scroll a long way to get the thing you want (either m, v or c).
So this is why I would do it ;).
Anyway: do includes make the program run slower (I have read many threads about it, but there are way to many opinions, so I would be grateful if you post your opinions here, thx ;).
Thanks for your answer,
Sincerely
Karlheinz Toni
p.s.: why wouldn't you put them in a seperate directory (just overkill?), would you use classes that are structured like this if you are looking for a implementation of something and find it in this structure?

Similar Messages

  • Creating a new package for a new project

    how do I create a new package? I have an existing piece of code that was written using a pacakge that looks like a file directory structure. I have found most of thoes file. how do I recreate that package?

    can I use a package I create? I have seen in the wizard for JDeveloper 9i. the packages there dont match the packages I am trying to reproduce.
    I have taken over an application that contains a package that needs to recreated.

  • How can I set firefox in order to open a new tab for every new search?

    Every search i've done since the last update, Firefox open the new search in the old tab. I've already fixed the boolean valor in browser.search.openintab to true in about:config, but it's working only with google search (and not, i.e. with youtube search).

    Separate Issue;
    Your System Details shows;
    Installed Plug-ins
    Adobe Shockwave for Director Netscape plug-in, version 12.0.9.149
    Adobe Shockwave for Director Netscape plug-in, version 12.1.3.153
    Having more than one version of a program may cause issues.
    Grab the uninstaller from here:
    '''[http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-windows.html Uninstall Flash Player | Windows]'''
    '''[http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-mac-os.html Uninstall Flash Player | Mac]'''
    Then reinstall the latest version.
    Flash Player '''Version 17.0.0.134<br>https://www.adobe.com/products/flashplayer/distribution3.html'''
    Shockwave Director '''Version 12.1.7.157 http://get.adobe.com/shockwave/'''

  • NOT specify new DataSource for every new stored procedure?

    I'm in a solution where I'm having multiple reports, and I want to create my reports one at a time, create a stored procedure for it, then create a report for that stored procedure, then go on to the next report in the same way.  The problem is that
    in Visual Studio, the DataSource does not update to recognize the new stored procedure, so I have to keep creating a new data source each time.  Is there any way around this so I don't have to create a million data sources?

    Hi jiwakersm,
    I will answer your questions one by one:
    Report Builder vs Report Designer:
    • Report Builder is available in two versions: stand-alone and ClickOnce. The stand-alone version is installed on your computer by you or an administrator. The ClickOnce version is installed automatically with SQL Server 2012 Reporting Services (SSRS)
    and downloaded to your computer from Report Manager or a SharePoint site integrated with Reporting Services.
    • Report Designer in Business Intelligence Development Studio is a report authoring environment that is hosted in Microsoft Visual Studio.
    If we want to
    create an .rdlc report file, we should use ReportViewer control in an application project or a Web site. If we want to open an .rdlc report file, we should open the project or web site in Visual Studio. Note that Report Builder and Report Designer are not
    included in Visual Studio.
    As to the Report Data pane, we should click one report in the Solution Explorer, then select Report Data after clicking View button in the menu pane. The document said that “create a data source reference, and then select the new option.” means we should
    create a shared data source in advance (we can create it in Solution Explorer), then use it as data source. If you are create .rdlc report in Visual Studio, we couldn’t create shared data source. But we can create one data source, then use it to create several
    reports in the same project.
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • "A new folder for every project file"

    Aha!!  Right, from now on ... (thanks Steve)
    From the Muvipix.com Guide to Adobe PE11 by Steve Grisetti
    (p 36) [on starting and saving a new project]
    2     Click the Browse button to choose a location to save your new
    project file.
    We at Muvipix recommend always selecting the Browse option and,
    wherever you choose to save your file, creating a new folder for every
    new project file.
    This little bit of housekeeping keeps all of your new project's files in
    one neat, little folder. And, when your project is done and you want to
    clear it from your computer, you can then remove not only the project
    file but all of the temp, render and scratch disk files Premiere Elements
    has created for that project simply by deleting that single folder!
    This makes post-project clean-up a much easier and neater process.
    OK, hope I've got it this time (at last)
    cheers
    Brian

    Oh no!  I thought I’ll re-work that Canal video again, but this time saved the project from the very start in a new folder on an ext HD (500 GB) connected USB3.0.  Tried all sorts of things on it, saved each time in the same folder.   Cleared all 14 clips from Project Assets (which of course emptied the timeline).   Shut down PE11.   Checked via Windows Explorer that the project files were all on the ext HD – and by the way, there are no other files on it, just the PE files.  My understanding is that Advanced System Care Pro (Iobit) regularly defrags all my drives if necessary (tho’ I haven’t done this manually for months with this drive).
    OK, opened PE, went to Open Recent Projects, it shows the above .prel file and the entire path, I click on it and – 
    Weird, just weird
    Nil desperandum
    Brian
    Edited --- and another weird thing, my email isn't sending the complete message I type to this forum.   I sent a whole message once and it never appeared, but this time it's cut off half a sentence above (it did this before, earlier today).
    That sentence should read,
    OK, opened PE, went to Open Recent Projects, it shows the above .prel file and the entire path, I click on it and – nothing happened!   (You'll have gathered that's what happened, but I wrote it in my Windows Live Mail, sent via BT-Yahoo ISP ......... )  Hey wait, there was a whole lot more.
    Here's a copy / paste from Windows Live Mail outbox
    It’s so odd, because as I said previously, most of the time it works so well, does all the things it’s supposed to do.   I followed Steve’s instructions here to the letter.   By the way, as you know, it’s not just the ext HD, this has been happening all along with allowing PE to save everything in its default Folder 11.
    I would be – now – very sorry indeed to have to abandon PE11 simply on this account, but it’s causing me to waste such a lot of time.   (Let alone the expense of buying it, plust one Lynda.com course, plus 2 books – not forgetting that I’d previously tried the Corel software and bought a book and DVD for that too!!)
    Might just use – what’s that simplicity-itself thingy everyone uses who just want to get any old kind of thing up on You Tube ..........   Oi vey!! <<more weary sigh>>
    Weird, just weird
    Nil desperandum

  • Changing customer number in alv top of page for every new customer

    hi experts,
    in alv grid display top-of- page, how to change customer number  customer name for every new customer.
    please help me.
    Regards
    Naveen.

    You may look into this blog
    http://help-abap.blogspot.com/2008/09/salv-model-5-add-header-top-of-page.html
    This is has been contributed by one of the SCN contributor Naimesh Patel.

  • How do i increase my key ID +1 for every new user

    what iam trying to do is that for every new user that register on my app will get a key id.. that is +1 higher then the old highest id.. i have done this i JavaDB but in mysql i get an exception
    here is my sql Q:
    sql = "insert into " + mytest_TABLE + "(" + mytest_ID + ", " + mytest_NAME
    + ") values ((case when (select max(" + mytest_ID + ") from " + mytest_TABLE + ")"
    + "IS NULL then 1 else (select max(" + mytest_ID + ") from " + mytest_TABLE + ")+1 end), "
    + encodeSQL(firstName) + ")";
    here is my exception:
    by the way mytest is my table..
    java.sql.SQLException: You can't specify target table 'mytest' for update in FROM clause
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:3250)
    at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1355)
    at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1270)
    at cont.tt.updateContact(tt.java:49)
    at cont.tt.jButton3ActionPerformed(tt.java:179)
    at cont.tt.access$200(tt.java:6)
    at cont.tt$3.actionPerformed(tt.java:140)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6038)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
    at java.awt.Component.processEvent(Component.java:5803)
    at java.awt.Container.processEvent(Container.java:2058)
    at java.awt.Component.dispatchEventImpl(Component.java:4410)
    at java.awt.Container.dispatchEventImpl(Container.java:2116)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
    at java.awt.Container.dispatchEventImpl(Container.java:2102)
    at java.awt.Window.dispatchEventImpl(Window.java:2429)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    sry for my bad english..
    really hope someone can help me out

    You need an 'Identity' column. In MySQL, you need to enable autoincrement and don't insert a value in the column while adding records; MySQL will auto increment the value.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    ----------------------------------------------------------------

  • A new socket for every http-request?

    Do I have to make a new socket for every http-request? The code below doesn't work because it is two requests in a row. The first GET works, but the second doesn't. I thought that the purpose of a socket is that you set it up once and then you should be able to do arbitrary communication between the two peers. Maybe that is just the case with sockets only but not if you use sockets to perform http.
    Thank you for your answers! Nice greetings from Austria (not Australia)!
    Stefan :)
    package httptest;
    import javax.net.ssl.*;
    import java.io.*;
    import java.net.*;
    public class Conn2 {
        private PrintWriter out;
        private BufferedReader in;
        private Socket socket;
        public Conn2()
            try {
             socket = new Socket("www.google.at", 80);
             out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())));         
             if (out.checkError())
              System.out.println("SSLSocketClient:  java.io.PrintWriter error");
             in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                System.out.println("Connect erfolgreich.");
         } catch (Exception e) {
             System.err.println(e);
        public void test()
            String inputLine;
            // 1. GET
            out.println("GET / HTTP/1.0");
         out.println();
         out.flush();
         try
                while ((inputLine = in.readLine()) != null)
                    System.out.println(inputLine);
            catch(IOException e)
                System.err.println(e);
            // 2. GET
            out.println("GET / HTTP/1.0");
         out.println();
         out.flush();
            try
                while ((inputLine = in.readLine()) != null)
                    System.out.println(inputLine);
            catch(IOException e)
                System.err.println(e);
    }

    Normally in the HTTP protocol, the server will close the connection after every request. So after you do the first GET, the server sends you the result and closes the connection. You have to open a new connection for the second GET.
    You can set specific headers to keep the connection open, which makes things faster if you have to do multiple GET's quickly after another. Lookup the specification of the HTTP protocol on http://www.ietf.org/
    Maybe it's easier to use a HTTP client library like Apache's HTTPClient: http://jakarta.apache.org/commons/httpclient/ so that you don't have to implement all the difficulties of the HTTP protocol yourself.

  • Variable field in Header for every new page

    Hi Friends.
    I am printing a new page on every new material no encountered . At the same time the HEADER has a field called Container name which is different for each  material so this header field needs to be update each time when a new page is called to print .
    How to handle this ? Please advise .
    In my z calling program I am using this logic .
    If  old_matnr  <> new_matnr
    PERFORM PRINT USING 'MAIN' 'NEW_PAGE'.
    endif.
    Thanks!!
    Hari

    If you have created a seperate window for header then you cant pass a changing field . Instead keep that header window in the main window that will serve your purpose.
    you need to put the condition
    if &page& eq '1'.
    header code.
    endif.
    Reward points if useful.
    Regards,
    Nageswar

  • Mail to be send for every new pur group

    Hi ,
    I have to send mail to recipients of  the purchase grp ekgrp..
    right now im able to send mail to all purchase orders of the pur.group, individually.
    but my requirement demands that
    the mail has to triggered for every new pur.group, all the pur orders wthin that group has to come in the mail body of that purchase group.
    now actually one loop is already running, plz avoid nested loops.. and  help me out asap.
    I give you the following code .
    all respective data declared above.
    FORM form_send_mail .
      SELECT ekgrp smtp_addr FROM zmmtr_ekko INTO TABLE it_zmmtr_ekko.
    SORT it_final by ekgrp.
      LOOP AT it_final." into wa_final.
        CLEAR: wa_objtxt,wa_reclist,wa_doc_chng,wa_objpack,g_tab_lines.
        REFRESH:it_objtxt,it_reclist,it_objpack.
    Mail Subject
        wa_doc_chng-obj_descr = c_subject.
    *Mail sensitivity
        wa_doc_chng-sensitivty = c_p.
    *Fetching employee name
        READ TABLE it_zmmtr_ekko  WITH KEY ekgrp = it_final-ekgrp.
        IF sy-subrc = 0.
          g_email = it_zmmtr_ekko-smtp_addr.
        ELSE.
          CONCATENATE c_message it_final-ekgrp INTO g_message SEPARATED BY space.
          WRITE: g_message.
          CONTINUE.
        ENDIF.
        MOVE c_hi TO wa_objtxt.
        APPEND wa_objtxt TO it_objtxt.
        CLEAR wa_objtxt.
            APPEND wa_objtxt TO it_objtxt.
          CONCATENATE c_po it_final-ebeln INTO wa_objtxt SEPARATED BY space.
          APPEND wa_objtxt TO it_objtxt.
          CLEAR wa_objtxt.
         APPEND wa_objtxt TO it_objtxt.
        DESCRIBE TABLE it_objtxt[] LINES g_tab_lines.
        READ TABLE it_objtxt into wa_objtxt index g_tab_lines."INTO wa_objtxt INDEX 1."g_tab_lines.
        wa_doc_chng-obj_langu = c_en.
    *Size of message body
        wa_doc_chng-doc_size = ( g_tab_lines - 1 ) * 255 + STRLEN( wa_objtxt ).
    *Creation of the entry for the compressed document
        CLEAR wa_objpack-transf_bin.
        wa_objpack-head_start = 1.
        wa_objpack-head_num = 0.
        wa_objpack-body_start = 1.
        wa_objpack-body_num = g_tab_lines.
        wa_objpack-doc_type = c_raw.
        APPEND wa_objpack TO it_objpack.
    *Completing the recipient list
    *target recipent
        REFRESH: it_reclist.
        CLEAR: wa_reclist.
        wa_reclist-receiver = g_email.
        wa_reclist-rec_type = c_u.
        APPEND wa_reclist TO it_reclist.
    AT NEW ekgrp.
          CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
            EXPORTING
              document_data              = wa_doc_chng
              put_in_outbox              = c_x
              commit_work                = c_x
            IMPORTING
              sent_to_all                = g_sent_to_all
            TABLES
              packing_list               = it_objpack
              contents_txt               = it_objtxt
              receivers                  = it_reclist
            EXCEPTIONS
              too_many_receivers         = 1
              document_not_sent          = 2
              document_type_not_exist    = 3
              operation_no_authorization = 4
              parameter_error            = 5
              x_error                    = 6
              enqueue_error              = 7
              OTHERS                     = 8.
        ENDAT.
        CASE sy-subrc.
          WHEN 0.
              WRITE: / c_mail ,g_email,c_mail0,it_final-ekgrp, it_final-ebeln, it_final-lifnr.
              SKIP 1.
          WHEN 1.
            WRITE: / c_mail1."chk mail content and do it..
            SKIP 1.
          WHEN 2.
            WRITE: / c_mail2.
            SKIP 1.
          WHEN 3.
            WRITE: / c_mail3.
            SKIP 1.
          WHEN OTHERS.
            WRITE: / c_mail4.
            SKIP 1.
        ENDCASE.
      ENDLOOP.
      WRITE:       / c_mail5.
      SKIP 1.
    ENDFORM.                    " FORM
    Rgds,

    The newly created database should automatically get picked up the maintenance plan.
    http://sqlmag.com/sql-server/inside-database-maintenance-plans
    No need to manually update the plan. I feel you need to have valid full backup for its successive Diff or Transaction log backup. 
    Are you getting any error in the job history?
    -Prashanth

  • Include report header for every new page.

    Hi expert,
    I have create a report with two buttons, 'previous page' and 'next page'. when i click the buttons, my report will go to another new page. I am using NEW-PAGE in my report.
    My problem now is, how can i include TOP-OF-PAGE for every new page in my report? When i click on the button, the TOP-OF-PAGE will not trigger by my report.
    Pls advise how to solve it.
    Thanks in advance.

    top-of-page will get triggered in spool request only when u run in background.

  • According to material num,for every new material num  one line space.

    Hi,
    please give suggestion how to get vertical lines without breaking as shown below.
    I want according to material number(AT1),for every new material number  one line space have to be there.
    I used 'skip' so the verical line is breaking for every new material.
    Material Number  |   Material Description
    _____________ |______________________________________________
    |    AT1                  |   Catalyst - 18165-RNA-A013-Y2
    |    AT2                  |   Catalyst - 18165-RNA-A013-Y2
    |    AT3                  |   Catalyst - 18165-RNA-A013-Y2 (COPY)
    |    AT4                  |   Catalyst - 18165-RNA-A013-Y2
    |    AT5                  |   Catalyst - 18165-RNA-A013-Y2
    |   CGW0001             SUBSTRATE 148 X 84 X 67 - 400/6/S/0.699L
    |  CGW0001              SUBSTRATE 148 X 84 X 67 - 400/6/S/0.699L
    |  CGW0001              SUBSTRATE 148 X 84 X 67 - 400/6/S/0.699L
    CGW0001             SUBSTRATE 148 X 84 X 67 - 400/6/S/0.699L
    |   CGW0001             SUBSTRATE 148 X 84 X 67 - 400/6/S/0.699L
    |   CGW0001             SUBSTRATE 148 X 84 X 67 - 400/6/S/0.699L
    |   CGW0001             SUBSTRATE 148 X 84 X 67 - 400/6/S/0.699L
    I need line continous but for every new material to material gap.
    Thanks,
    sree.

    Hi,
    write code like this.
    write : /1 sy-vline,120 sy-vline.
    give the line size for ex 120
    reward if usefull

  • Any way to PERMANENTLY zoom Firefox a certain amount, rather than having to re-zoom-in again every time for every new webpage?

    Any way to PERMANENTLY zoom Firefox a certain amount, rather than having to re-zoom-in again every time for every new webpage?
    == This happened ==
    Every time Firefox opened

    https://addons.mozilla.org/en-US/firefox/addon/6965
    http://urandom.ca/nosquint/

  • Trigger SEQ column for every new value of ID it should start from 1

    I have
    table table_A
    (ID NUMBER,
    SEQ NUMBER,
    DETAIL VARCHAR2(2000))
    In this table ID and SEQ are combined primary key
    Data looks like
    ID     SEQ     DETAIL
    1000     1     COMMENTS1
    1000     2     COMMENTS2
    1001     1     COMMENTS3
    1002     1     COMMENTS4
    1002     2     COMMENTS5
    1002     3     COMMENTS6
    1003     1     COMMENTS7
    I have ID as oracle generated seq Number , but I need trigger to generate SEQ column value for every new value of ID it should start from 1

    This is probably not something you would want to do in a trigger. You would generally be much better off storing ID and detail in the table and generating SEQ in a view, i.e.
    CREATE VIEW my_view
    AS
    SELECT id,
           DENSE_RANK() OVER( PARTITION BY id ORDER BY <<something>>) seq,
           detail
      FROM table_AUnless you can guarantee that only one session will be inserting data at a time, I don't see how you could make a trigger work here.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • I upgraded my iphone to 5.0.1 and ever since, it has decided to delete old text messages. Only with one contact though, not everybody. So for every new text message I send this person, an old one gets removed. Why? I don't want this to happen.

    I upgraded my iphone to 5.0.1 and ever since, it has decided to delete old text messages. Only with one contact though, not everybody. So for every new text message I send this person, an old one gets removed. Why? I don't want this to happen.

    Connect the phone directly to the computer, not a hub.
    Disconnect all other USB devices except keyboard and mouse.
    Disable your firewall
    Disable your antivirus
    In iTunes if it recognizes the phone click "Restore"
    If it doesn't recognize the phone:
    Disconnect the phone from the phone end, leave the USB cable plugged into the computer
    Hold the HOME and SLEEP buttons until the screen turns black, excactly 10 seconds, then release the SLEEP but continue holding the HOME (If an Apple logo appears you have held SLEEP too long; do it over)
    While holding HOME connect the cable to the phone
    As soon as iTunes recognizes the phone release the HOME button and it should restore.
    If neither procedure works note the exact error message and post it.

Maybe you are looking for

  • IMovie HD 6.0.3 won't see my Sony HDR-CX11E USB connected camcorder

    Despite spending 4 hours now and wanting to shoot myself in the face. My brand new Sony HDR-CX11E is not being recognised by Imovie HD 6.0.3. I have followed the instructions to the letter about a hundred times now. I'm using a Intel Core Duo imac, w

  • Mavericks has killed my battery!!

    Come on Apple, you've really dropped the ball on this one and you're silence is deafening! I have a mid 2009 Macbook Pro. I installed a new genuine battery about six months ago and could use my Macbook all day without having to plug it in. Since 'upg

  • Is possible to assign picture in paragraph style or create bullet?

    I need to  assign Illustrator picture (B&W) before text. Is this possible? Or exist way, how to create from this pictue bullet? Thanks

  • OSX Mountain Lion: Finder - Open With

    Hi, For a perticular file format, NEF (Nikon Electronic Format) when I do Open With I am presented with redundant applications as seen below. How can I clean them off? Note that the repeated applications could indeed be pointing to older increnetal e

  • Hyperion Planning form importing not working

    I created a new application in hyperion planning, and migrated forms from the previous application by FormDefUtil. The form migration failed with error message: Unable to find JDBC_CATALOG key for application: NCGC_LP Can not login to application: NC