Article View: borland.public.jbuilder.java.language
Article #7208Combine methods
From: KK
Date: Tue, 03 Jul 2001 04:19
Date: Tue, 03 Jul 2001 04:19
28 lines
1853 bytes
1853 bytes
Dear all:
Is there any solution to combine the following methods into one? Since they
look similar, I would like to combine them and make the program simplier.
Ken
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
public void showDlgSimLib() {
dlg_ec_simlib dlg = new dlg_ec_simlib(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x,
(frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.show();
}
public void showDlgSimLib() {
dlg_ec_simlib dlg = new dlg_ec_simlib(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x,
(frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.show();
}
Technical Details
Message-ID:
<3b414874_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!gatel-ffm!news-fra1.dfn.de!news-lei1.dfn.de!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.stgl.sel.alcatel.de!news.stgl.sel.alcatel.de!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,b25916793f54693d,start X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-07-02 21:36:25 PST From: "KK" <kk@hotmail.com> Newsgroups: borland.public.jbuilder.java.language Subject: Combine methods Date: Tue, 3 Jul 2001 12:19:53 +0800 Lines: 30 Organization: CDS X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.3018.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 NNTP-Posting-Host: 158.140.230.175 Message-ID: <3b414874_1@dnews> X-Trace: dnews 994134132 158.140.230.175 (2 Jul 2001 21:22:12 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!gatel-ffm!news-fra1.dfn.de!news-lei1.dfn.de!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.stgl.sel.alcatel.de!news.stgl.sel.alcatel.de!dnews