How to inactive main window?
Dear friends,
I have created a progress window using the below code.
public class ProgressDialogBox {
private static final long serialVersionUID = 4999455972206841456L;
private static JDialog dialog = null;
JLabel label;
JProgressBar progress;
JPanel content;
public JDialog getDialogBox(CSMainView csMainView) {
JLabel label = null;
JProgressBar progressBar = null;
JPanel content = null;
if(dialog == null) {
dialog = new JDialog();
dialog.setTitle("Progress Bar");
dialog.setAlwaysOnTop(true);
label = new JLabel("Please wait...");
label.setFont(new Font("Tahoma", Font.PLAIN, 13));
label.setBackground(Color.RED);
label.setForeground(Color.DARK_GRAY);
progressBar = new JProgressBar();
progressBar.setIndeterminate(true);
progressBar.setOpaque(false);
content=new JPanel(new GridLayout(2, 1, -15, 5));
content.add(progressBar);
content.add(label);
content.setBorder(BorderFactory.createEmptyBorder(30, 20, 30, 20));
dialog.add(content);
dialog.pack();
dialog.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
dialog.setLocationRelativeTo(csMainView.getMainFrame());
dialog.setVisible(true);
return dialog;
}code to call the progress bar is
ProgressDialogBox dialogBox = new ProgressDialogBox();
JDialog dialog = dialogBox.getDialogBox(csMainView);The progress bar has to be displayed when i click START button.
The problem is when i click start button, the progress window is displyed. but at the same time i can able to click start button again.
My question is, the main window should not be active till the progress bar window is closed.
Could anyone please tell me how to do this?
Thanks in advance,
Sathish
Hi friends,
my code is to display the ProgressBar is,
public class ProgressDialogBox {
private static final long serialVersionUID = 4999455972206841456L;
private static JDialog dialog = null;
JLabel label;
JProgressBar progress;
JPanel content;
public JDialog getDialogBox(CSMainView csMainView) {
JLabel label = null;
JProgressBar progressBar = null;
JPanel content = null;
if(dialog == null) {
dialog = new JDialog();
dialog.setTitle("Progress Bar");
//dialog.setAlwaysOnTop(true);
label = new JLabel("Please wait...");
label.setFont(new Font("Tahoma", Font.PLAIN, 13));
label.setBackground(Color.RED);
label.setForeground(Color.DARK_GRAY);
progressBar = new JProgressBar();
progressBar.setIndeterminate(true);
progressBar.setOpaque(false);
content=new JPanel(new GridLayout(2, 1, -15, 5));
content.add(progressBar);
content.add(label);
content.setBorder(BorderFactory.createEmptyBorder(30, 20, 30, 20));
dialog.add(content);
dialog.pack();
dialog.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
dialog.setModal(true);
dialog.setLocationRelativeTo(csMainView.getMainFrame());
dialog.setVisible(true);
return dialog;
}calling is,
ProgressDialogBox dialogBox = new ProgressDialogBox();
JDialog dialog = dialogBox.getDialogBox(csMainView); //Creating instance and calling ProgressBar dialog box
isStarted = cmdExecution.startApplication(); //This is the application to start, this takes several minutes to start, till that time ProgressBar has to be displayed.
dialog.setVisible(false); //Disposing ProgressBar once the application started.
dialog.dispose();If i give,
dialog.setModal(true); then i can unable to dispose the ProgressDialogBox.
Could anyone please tell me how to dispose this?
Sathish
Similar Messages
-
How to change main window title of oracle ebs
Hi all,
Kindly tell me how can we change the main title of oracle ebs 11i.
ThanksHello Gloscott,
Welcome to the Aperture discussion forum. Congratulations. You just hijacked a thread. That's bad form for 2 reasons. First, you added a message to a thread called "How to change main window view" which makes it look like you had information to add that thread, and you did not. Second, people who can help you are more likely to read a message that has your problem in the subject than they are to read this message. I.e., you won't get what you want if you ask for something else.
That being said, when you repost your query in a new thread, you'll have to be more specific. A "Frame" is not in the regular Aperture terminology.
nathan
Message was edited by: Mr Endo -
How to hide main window in JavaFX 2.0
I want to hide application window in JavaFX 2.0, calling hide() on Stage object terminate application. How to hide main window and left application running?
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class SysTray extends Application {
public static void main(String[] args) {
Application.launch(SysTray.class, args);
@Override
public void start(final Stage s) throws Exception {
Group rootGroup=new Group();
Scene scene=new Scene(rootGroup, 800, 600);
s.setScene(scene);
Button hide=new Button("hide");
hide.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent paramT) {
s.hide();
BorderPane mainPane=new BorderPane();
mainPane.setCenter(hide);
scene.setRoot(mainPane);
s.setVisible(true);
}That's interesting. I just checked and it looks like http://download.oracle.com/javafx/2.0/api/javafx/stage/Stage.html#close%28%29 is also an alias for setVisible(false);
A little weird that they would have two aliases for such a thing. I'm guessing that setVisible isn't supposed to end the application, but what with JavaFX still being in Beta, the given functionality is acting as a placeholder. Maybe you should check [url http://javafx-jira.kenai.com/]Jira to see if this is already an issue. If not, you should probably file it to make sure. -
How to close main window on click of a button on popup window
Hi All,
I have created a web page which on certain condition display a popup window to to provide information. Wht i want is that when i click on close button on my popup window, my main window should also close.
Can anyone please help with this requierment!!!
Regards,
tusharHi All,
Could anyone of you please help me by answering the thread
WDDOEXIT method not called when the application is closed from the portal
Thanks,
Subash M -
[Urgent] How to Print Main Window Twice ??
Hi Everyone,
I am making a Prenum Check which has
1 Main Win 00 : Invoiced Item Lines for the Check Payment
2 Check Window: A Check to be printed
3 Main Win 01 : Copy of Main Win 00
The Main Window has Line Items of the Payment Invoices for Vendor, which can flow across multiple pages.So I cannot use NEW-WINDOW. I cannot make the changes in SAP Program. Please help me sorting out this issue with some small PERFORM Code which will copy contents of current main window and print it back in new window on the same page.
Please Help me....
Thanks in Advance.
Regards,
Abhsihek B.HII
HAVE ALOOK AT THE CODE
TABLES : KNA1 , T005T.
SELECT-OPTIONS : S_KUNNR FOR KNA1-KUNNR.
DATA : BEGIN OF ITAB OCCURS 0,
KUNNR LIKE KNA1-KUNNR,
NAME1 LIKE KNA1-NAME1,
LAND1 LIKE KNA1-LAND1,
LANDX LIKE T005T-LANDX,
END OF ITAB.
DATA : V_LANDX TYPE T005T-LANDX.
DATA : IT_STEXT TYPE TLINE OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
SELECT KUNNR NAME1 LAND1 FROM KNA1 INTO CORRESPONDING FIELDS OF TABLE
ITAB WHERE KUNNR IN
S_KUNNR.
LOOP AT ITAB.
SELECT SINGLE LANDX FROM T005T INTO (V_LANDX) WHERE LAND1 = ITAB-LAND1.
ITAB-LANDX = V_LANDX.
MODIFY ITAB INDEX SY-TABIX.
ENDLOOP.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'Z50653_PAGE1'
LANGUAGE = 'E'
OPTIONS =
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJECT =
RAW_DATA_INTERFACE = '*'
SPONUMIV =
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
CODEPAGE = 11
OTHERS = 12
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'START_FORM'
EXPORTING
ARCHIVE_INDEX =
FORM = 'Z50653_PAGE1'
LANGUAGE = 'E'
STARTPAGE = 'PAGE1'
PROGRAM = ' '
MAIL_APPL_OBJECT =
IMPORTING
LANGUAGE =
EXCEPTIONS
FORM = 1
FORMAT = 2
UNENDED = 3
UNOPENED = 4
UNUSED = 5
SPOOL_ERROR = 6
CODEPAGE = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT ITAB.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = ' '
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endloop.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
CODEPAGE = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
How to print main window data in second page without header
hi friends.,,,,,,,,,,,,,,,,,,,,
I am printing billing docu details in main window ,the data is coming in two pages but there is problem in printing as the tables is continuing in second page the line is not coming for the table for first row,space is also coming for second page for header .
my issue is to remove space before printing table and line should come for the table for 1st row in second page.
please help .
thanks in advance.Hi Raghukumar,
1. For the line not coming on the top row of the second page, check if the rowtype u have used in the table has been given a border on the upper side.
2.For the space issue in the second page, I assume you might have used only a single Page in your smartform and the same page is called again.Hence as per the main window size and length data will be displayed in all pages of the smartform.
You may need to create a second page with the Main window length occupying the compete page so that data display starts from the top of the page. next Page attributes of the smartforms should be entered accordingly.
Please try to elaborate your query to help us understand your issue.
Regards,
Rijuraj -
How to make main window (JFrame)as full screen in java??
Hi all ,
I got in some trouble for JFrame. I want my main window as full screen(maximum size as moniter ) ,
now i am using jframe.setBounds(0,0,1000,900) method for fixing its size.
any body is having idea to maximize window size by default???
gavinHi
use this to get the screen size.
so as to fit your gui to its size.
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); -
How to increase main window size dynamically in sapscript
Hi,
I have to print all records which are available in internal table in a main window.The main window is in between two variable windows.And below two other varaible windows are there.
I want main window size to be increased as per no. of records available(max 12 records) in internal table.
If the specified size is insufficient then the variable window which is below the main window should move below to accommodate the records available in internal table.
This is very urgent requirement.
Please help me.
Regards,
VidyaHi Vidya,
Main Window size cannot be changed dynamically.
They are static values.
However, i hate to say this again but
if you use a table with a footer the footer of the table will move up if the number
of records are less. Sorry for not having a more positive reply. -
How to close the main window from Popup
hello all,
i need to close the main window from a popup, so i create a popup and after clicking on close button of this popup, should also the main window be closed.
how can do this please?
BRHi
Please go through this.. check thomas reply
Re: Close Main Window directly on action on Pop up window
also check this..
how to close main window on click of a button on popup window
cheers,
Kris.
Edited by: kissnas on May 12, 2011 5:06 PM -
Main window data to be page protected in smartform
Hello Experts,
I want to make Main window data to be page protected.
But page Protection check box is in Noneditable mode .
Please let me know, how to make main window data to be page protected.
Regards
MohitHi,
Try this way
Under the Main Table node, you will find, Header, Main Area and Footer.
Select Main Area, right click Create> Folder
Drag the Row item inside the Folder
Select the Folder node, for Folder node out put options, you can select Page Protection check box.
Main Window
Header
Main Area
Folder
Row Items
Footer
Regards
Bala Krishna -
Hi gurus in scripts i want to display more then one main window on the page
hi gurus in scripts i want to display more then one main window on the page how it is to follow any body explain to me plz.
Hi all,
I am printing check printing from F110 with Z-form and it has been assigne to FBZP also..
My client need to print the check information twise that means main window data two times.
like this:
First main window. : invice# amt amt
9002 4000 4000
9005 5000 4000
Al so they want like to print same in down part of the main window.
First main window. : invice# amt amt
9002 4000 4000
9005 5000 4000
For this i have created instance main window of main window like MAIN 01, but it is not displaying the data in instnce window data
in the instance main window.
Question: Could you please let me know abt the same or good solution. How to cal main window instance , i tried with
/: NEW-WINDOW in instance main window part but it also appering in main windoe also.
could you please let me know how to call instance main window or any other solution to get teh data like my example above.
thx -
How to use Two main windows with in a page in script ?
Hi any body explain me...
How to use Two main windows with in a page in script ?
with header data in one main window,
& Item data in other main window.HI..,
u need to go for <b>SPLITTING THE MAIN WINDOW</b> !!!
Main windows in page windows allow you to format text in multiple columns. Define an area in the page window, in which to position the main windows.
Here is the procedure !!
-->Create a page window and assign it to a page.
Choose <b>Edit --> Main windows</b>.
A dialog box appears.
-->Enter values in the fields <b>Area width</b> and A<b>rea height</b> in accordance with the input guidelines for main windows.
-->Enter values in the fields <b>Spacing</b> and Number in the <b>Horizontal group</b> if you want to use multiple columns. You can ignore the fields in the Vertical group.
Determine how many columns and line areas are required for label printing. Then enter the corresponding values in the fields in the <b>Horizontal and Vertical groups</b>.
-->The value in the field Left margin varies from main window to main window if multiple columns are used. The following applies:
<b>
Left margin of current column + Window width + Horizontal spacing = Left margin of next column</b>
In label printing, the field Upper margin also varies from main window to main window:
<b>
Upper margin of current main window + Window height + Vertical spacing = Upper margin of next main window</b>
-->Enter a value in the field Start position.
This is a counter. Enter a starting value which is equal to or greater than 1.
-->The main windows are added to the list.
-->Save your form.
reward if it helps u...
sai ramesh -
How to pop new window in running main window
i have to popup a sub windopw in main window....and i need to plot common data to be printed on front panal...
i am usind daq ...can i share same daq in main and sub window...hao??or can i share some calculated value in main and sub window of labview.,,pleasehelp me fastAs KoenR has said - you can use SubVIs and set them to 'Show front panel when called' which will make them show as new windows in your application.
As for sharing the data, you could use something like a notifier (under synchronisation) for broadcasting the data to the SubVI. If you create the notifier in your main application, with a send notification VI and then pass the reference to the notifier into the SubVI when you call it which has a 'wait on notification' VI it will then receive the data form the main loop.
If you look in the LabVIEW examples under 'notifiers' you will find 'Pass Data with Notifiers' which demonstrates how to use notifiers to pass data to SubVIs.
Certified LabVIEW Architect, Certified TestStand Developer
NI Days (and A&DF): 2010, 2011, 2013, 2014
NI Week: 2012, 2014
Knowledgeable in all things Giant Tetris and WebSockets -
How to change the default window size display font size on Lync 2013 main window?
Hi champs,
Just a simple non-technical question: How to change the default window size display font size on Lync 2013 main window on Windows 7 desktop?
Thanks,Hi,
Did you mean change the Lync: Change the Default Font and Color of Instant Messages just as Edwin said above?
If not, as I know, there is no natural way to change it.
If yes, on the latest version of Lync 2013 client, there is a new option “IM” on Lync client “Options” list. And you need to change the default Font and Color of IM in the interface of “IM”.
Best Regards,
Eason Huang
Eason Huang
TechNet Community Support -
I created a favorites toolbar. When I click on some of the icons, they open in the main window like I expect. Others open in a sidebar which I do not want and cannot even get to full size. How do I get all of them to open in the main window?
Generally, Bookmarks that open in the Sidebar are from links that you clicked on on web sites to add their Bookmark. To change that, right-click on the Bookmarks, opening in the Sidebar, choose "Properties" and un-check "Load this bookmark in the sidebar".
*For links and info on Bookmarks, see [https://support.mozilla.com/en-US/kb/how-do-i-use-bookmarks How do I use Bookmarks?]
'''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
Not related to your question, but...
You need to update some plug-ins:
*Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
*Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
*Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
*Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
*Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]
Maybe you are looking for
-
My iTunes keeps crashing every single time I open the software on any of my PCs and laptops. Once the Itunes match features starts it's ony a matter of a minute or two before the software crashes. I have tons of new songs that I want to sync to my
-
Syntax error in program "CL_HTTP_SERVER=CP " after EHP4 Upgrade
Hi All, Iam getting ABAP dumps after upgrading my system to EHP4 Windows ABAP+JAVA stack, Syntax error in program "CL_HTTP_SERVER================CP ". Error in the ABAP Application Program The current ABAP program "SAPLHTTP_RUNTIME" had to be termin
-
Hi, I am getting a dump error while using the FM GUI_UPLOAD, i am using the FM KD_GET_FILENAME_ON_F4 to get the file name and the Parameter is defined as parameters: p_pcfile type rlgrap-filename. The error is CALL_FUNCTION_CONFLICT_TYPE CX_SY_DYN_C
-
NSU 1.3.20en - ? Application Still Running
Hi All On two occasions after using NSU to check for updates (there were none) I exited application, it indicates phone connected to PC Suite by usb (ok so far) and then I disconnect phone. However when I come to close down PC there is something stil
-
Conversion from LV 5.1.1 to LV 6 or higher
Can anyone convert this little VI from LV 5.1.1 to LV 6 or higher so I can open it with Labview 2011? Thanks a lot! Solved! Go to Solution. Attachments: Relaiskarte 8Fach RS232.llb 159 KB