Catch Selection in JFileChooser without using Buttons
How do you catch a selection in a JFileChooser without using the OK Button?
If someone clicks on a file(and does not hit enter/cancel buttons), I want to get the file name.
I tried actionevent but it only works after the user hits a button.
I'm using Forte and it won't let me apply that listener to a filechooser. So unless I'm missing something, I'm not sure how to implement it or use it correctly
Similar Messages
-
Select extra row without using UNION ALL in pl/sql
Hi,
Can anyone tell me how to select extra row without using UNION or UNION ALL in pl/sql. Actually I want to have my o/p of query as partitioned by designation and ordered by salary and than one extra row which will contain the highest salary in a particular salary. My table has first_name,emp_id,designation and salary column. And I wnt the o/p as.
Mohinish,12212,SI,46000
Ram,11212,SSI,47000
Shyam,12133,SI,48000
Rick,9898,SI,46000
Rocky,12312,SSI,56000
Sariq,23948,SI,43000
Suman,12789,HR,49000
Sampy,12780,SI,46000
Parna,11111,HR,50000
Now the o/p should be.
Mohinish,12212,SI,46000
Rick,9898,SI,46000
Sariq,23948,SI,43000
Shyam,12133,SI,48000
Shyam,12133,SI,48000
Ram,11212,SSI,47000
Rocky,12312,SSI,56000
Rocky,12312,SSI,56000
Suman,12789,HR,49000
Parna,11111,HR,50000
Parna,11111,HR,50000
Thanks in AdvanceYou don't have to do a UNION or UNION ALL in PL/SQL but you would need to in SQL to get the desired output:
with data_recs
as (select 'Mohinish' first_name,12212 emp_id,'SI' designation,46000 salary from dual union
select 'Ram',11212,'SSI',47000 from dual union
select 'Shyam',12133,'SI',48000 from dual union
select 'Rick',9898,'SI',46000 from dual union
select 'Rocky',12312,'SSI',56000 from dual union
select 'Sariq',23948,'SI',43000 from dual union
select 'Suman',12789,'HR',49000 from dual union
select 'Sampy',12780,'SI',46000 from dual union
select 'Parna',11111,'HR',50000 from dual)
select first_name, emp_id, designation, salary from data_recs union all
select s.first_name, s.emp_id, s.designation, s.salary
from (select first_name,
emp_id,
designation,
salary,
row_number() over (partition by designation order by salary desc) high_salary
from data_recs
order by designation, salary) s
where s.high_salary = 1
order by designation, salary;
FIRST_NAME EMP_ID DESIGNATION SALARY
Suman 12789 HR 49000
Parna 11111 HR 50000
Parna 11111 HR 50000
Sariq 23948 SI 43000
Rick 9898 SI 46000
Mohinish 12212 SI 46000
Sampy 12780 SI 46000
Shyam 12133 SI 48000
Shyam 12133 SI 48000
Ram 11212 SSI 47000
Rocky 12312 SSI 56000
Rocky 12312 SSI 56000 -
How to read personal no's on selection in LDB without using GET PERNR
Hi to all
I am using Logical data base PNP and selection screen 900.
Now my requirement is to retrieve personal no's which are entered at selection seperately without using GET PERNR.
Ineed all the pernrwhich are entered in selection.
How to do that.
Please guide.
Regards
AnubhavHi,
You can do as SUJIT said or use GET PERNR and assign PERN-PERNR to Workarea and then append that to internal table.
DATA:
ITAB_PERNR like standard table of PA0000-pernr,
wa_pernr like line of ITAB_PERNR.
GET PERNR.
wa_pernr-pernr = pernr-pernr.
append wa_pernr to ITAB_PERNR
Hope this would help you.
Regards
Narin Nandivada. -
Select distinct records without using distinct
hi experts,
my retrieved data like these:
cnt_id cnt_type rcrd_id wrkflw_id
558848 PRODUCT 553503 248
558848 PRODUCT 553503 248
558848 PRODUCT 553503 248
558808 PRODUCT 553463 248
558808 PRODUCT 553463 248
558808 PRODUCT 553463 248
558810 PRODUCT 553463 248
558810 PRODUCT 553463 248
558810 PRODUCT 553463 248
now i want to select one record for each cnt_id without using any distinct function .. how can i do that?
regards,
SKPyou can use the below query
select * from t where rowid in (select max(rowid)
from t group by cnt_id)You're query is not the equivalent of DISTINCT.
SQL> ed
Wrote file afiedt.buf
1 create table t as
2 (select 558848 as cnt_id, 'PRODUCT' as cnt_type, 553503 as rcrd_id, 248 as wrkflw_id from dual union all
3 select 558848, 'RETURN', 553503, 248 from dual union all
4 select 558848, 'PRODUCT', 553503, 248 from dual union all
5 select 558808, 'PRODUCT', 553463, 248 from dual union all
6 select 558808, 'PRODUCT', 553463, 248 from dual union all
7 select 558808, 'PRODUCT', 553463, 248 from dual union all
8 select 558810, 'PRODUCT', 553463, 248 from dual union all
9 select 558810, 'PRODUCT', 553463, 248 from dual union all
10* select 558810, 'PRODUCT', 553463, 248 from dual)
11 /
Table created.
Elapsed: 00:00:00.01
SQL> select * from t where rowid in (select max(rowid) from t group by cnt_id);
CNT_ID CNT_TYP RCRD_ID WRKFLW_ID
558810 PRODUCT 553463 248
558808 PRODUCT 553463 248
558848 PRODUCT 553503 248
Elapsed: 00:00:00.00
SQL> select distinct * from t;
CNT_ID CNT_TYP RCRD_ID WRKFLW_ID
558810 PRODUCT 553463 248
558808 PRODUCT 553463 248
558848 RETURN 553503 248
558848 PRODUCT 553503 248
Elapsed: 00:00:00.00
SQL> -
SELECT n. row without using cursors
For example, I retrieved 100 rows after executing a SELECT statement but I want to list only 20th row. How can I do this without using cursors?
The general approach to getting a set of rows would be to do something like
SELECT *
FROM (SELECT a.*, rownum rn
FROM (<<query with ORDER BY clause>>) a
WHERE rownum <= <<max>>)
WHERE rn >= <<MIN>>Depending on the particular requirements, you could also do something like
SELECT *
FROM (SELECT a.*, RANK() OVER (<<ORDER BY clause>>) rnk
FROM <<table>> a
WHERE <<rest of statement>>)
WHERE rnk = 20Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Direct Selection of Carrier without using Optimizer
Is there any way we can select the carrier without activating the Optimizer setting in SAP TM.
For example, based on some condition,
like source location and destination within US, I need to select a carrier automatically
Any input will be appreciated.Can you assign it in the Sales Order?
Regards,
Mike -
Catching events on Desktop , without using any AWT or Swing components.
How can I catch events(for eg: mouse clicks) on the Desktop? I do not want to use any AWT or Swing components in my application.
Also, i want to get events even some other java/non-java application windows are visible on desktop, as long as my application is running.Myrequirement is to capture all AWT events, regardless of on which component its being happened.
I mean I have to capture events outside the current running application (on desktop and any other java/no-java appliation windows also).
I couldn't find any other forum which discusses about event handling.
This is part of my app. other end extensively uses awt. -
Selecting Multiple dimensions without using Dashboard Prompt
Hi All,
We have and requirement where we need to given an option to users where they should be able to select dimensions values to check set of reports in dashboard based on these selected values.
As we know one way is to have dashboard prompt and all the reports which we need to analyze under this, but in dashboard prompt if we more values selected values will take more time.
Instead we want in one page all the dimension values will be there and we need some thing like check box option in front of dimension values and based on the dimension values selection, we need to analyze reports available in another dashboard page.
Thanks in advance.
Regards,
SomThanks John for your reply.
I'm not sure this is going to help me, may be my question is little bit confusing. Let me explain with some example.
Lets us consider a dashboard page where we have All US States as global filter. Suppose by default global filter will have All values but now every time we want to analyze by selected states now to perform this we need to edit global filter and add States by which we want to analyze.
By this option we are able to get the result what we want, but problem is that suppose every time we want to analyze by these states only the every time when we login we need to edit global filter again and again. which we don't want to do again and again.
Now my questions are:-
1. Is there a way to save values selected into global filter for future use by which we cab avoid selecting values again and again (one way is that we can add defaults in global filter edit mode but can we do this outside.)
2. Or can we provide in one page just to select the values of analysis like dimensions and next to dimension like check box just to select values and in other pages based of the values selected.
Regards,
Somu -
Localizing JFileChooser (Without using UIManager)
Hello,
I need to localize JFileChooser (in French and German) and my application is only targeted to run on JRE 1.6+.
I read the following (at [http://www.rgagnon.com/javadetails/java-0299.html] ):
Modern Swing release have now built-in ready-to-use translations for the JFileChooser.
The language is choosen based on the current Locale. So you don't have to do anything to
display the JFileChooser in the right language.And I also got to know from the sun java swing forum
( at [http://forums.sun.com/thread.jspa?forumID=57&threadID=5121485] ) that :
The JFileChooser naturally is localized. You just need to ensure you have the internationalized jre.
If you mean to say you are running on an english OS and want it to display russian, then
it is a little more work.You could try calling
Locale.setDefault(<appropriate locale>);
The jre also may use the native file chooser, which makes things harder, in this case
the setting of the locale may not work.But no matter what I do I am not able to localize the JFileChooser.
Can any body tell me the correct procedure of doing this
(Well I know about the workaround i.e. doing it using the UIManager).
TIA and Regards,
VivekYes it works, Thanks a ton Darryl.Burke .
What you said is: You can also set the default locale on a per-class basis *before creating the instance* of the class and this works :-
//Works:
JFileChooser.setDefaultLocale(Locale.ITALIAN);
JFileChooser chooser = new JFileChooser();
chooser.showOpenDialog(null);But the below one dosen't (The one which I tried). Why ?
// Doesn't work
Locale.setDefault(Locale.ITALIAN);
JFileChooser chooser = new JFileChooser();
chooser.setLocale(Locale.ITALIAN);
chooser.showOpenDialog(null);*What is the difference between non-static method setLocale() and the static method setDefaultLocale() ?*
Thanks again Darryl.Burke
Vivek -
How can I reboot my iPod touch without using buttons
My iPod touch 3G has a broken power button and I have forgotten my password. Now I can't reboot it, please help me.
Use this program to place the iPod in recovery mode so you can restore the iPod.
RecBoot: Easy Way to Put iPhone into Recovery Mode
If you have a Mac then this program
The Firmware Umbrella - TinyUmbrella -
Play from menu without using buttons?
I want to set up a very simple menu -- only the title of the film. Is it possible to play the tracks from the first play menu with out assigning buttons. Basically I want the viewer to be able to stick the DVD in a player and press the play button to begin the film. All I can do right now is assign a button and you must press "enter" to begin-- the play button doesn't work. Any suggestions? Thanks.
You can just make the title of the film the first part of the track that is the first play for the disc.
Or you can make the menu that times out to the next track as a jump
Or you can make the title one track that jumps to the main menu, with the first track as first play -
Selecting from 2 pages using button HELP!!
i have 2 buttons in my application. i need to open 2 different jsp pages from 2 butttons. i.e if a user clicks on 1 button he should be redirected to 1 page and if he clicks another button he should be redirected to another page.
help pleaseWhats so hard about it?
Put them in two different html links.
If you are submitting a form, have an onclick event that changes the form action attribute.
ie <input type="submit" onclick="this.form.action='page1.jsp' ">
Or alternatively give the buttons two different names/values and dispatch the request at the server end
if (request.getParameter("button1") != null){
RequestDispatcher rd = request.getRequestDispatcher("page1.jsp");
rd.forward(request, response);
else if (request.getParameter("button2") != null){
}Cheers,
evnafets -
NEED AUDIO OFF/ON SCRIPT (WITHOUT USING BUTTONS)
I need code that
1. Turn ALL sounds in the movie off
2. Turn ALL sounds in the movie back on
all with out the user having the press a button. Something like an "onLoad" in javascript so it's automatic.
what I have so far for the OFF:
globalSound = new Sound();
globalSound.setVolume(0);
need code to turn it back on when the user hits the next embedded flash movie on the next scene.
THANK YOU!!!if that code works to mute all the sounds, then:
globalSound.setVolume(100); // will unmute them all. -
Needs help to retrive the last row in a select query without using rownum
Hi ,
i need to retrive the last row from the select sub query without using rownum.
is there any other way to retrive the last row other than the below query.
is that the ROWNUM=1 will always retrive the 1 row of the select query ?
select from*
*(select ename from employee where dept_id=5 order by desc) where rownum=1;*
Please advise.
thanks for your help advance,
regards,
Senthur957595 wrote:
Actually my problem is ithat while selecting the parents hiearchy of the child data using
CONNECT BY PRIOIR query
I need the immediate parent of my child data.
For example my connect BY query returns
AAA --- ROOT
BBB --PARENT -2
CCC --PARENT-1
DDD IS my input child to the connect by query
Immediate parent of my child data "DDD" ---> CCC(parent -1)
i want the data "CCC" from the select query,for that i am taking the last row of the query with rownum.
I got to hear that using ROWNUM to retrive the data will leads to some problem.It is a like a magic number.I am not sure what the problem will be.
So confusing with using this rownum in my query.
Please advice!!!It's not quite clear what you're wanting, but perhaps this may help?
you can select the PRIOR values to get the parent details if you want...
SQL> ed
Wrote file afiedt.buf
1 select empno, lpad(' ',(level-1)*2,' ')||ename as ename, prior empno as mgr
2 from emp
3 connect by mgr = prior empno
4* start with mgr is null
SQL> /
EMPNO ENAME MGR
7839 KING
7566 JONES 7839
7788 SCOTT 7566
7876 ADAMS 7788
7902 FORD 7566
7369 SMITH 7902
7698 BLAKE 7839
7499 ALLEN 7698
7521 WARD 7698
7654 MARTIN 7698
7844 TURNER 7698
7900 JAMES 7698
7782 CLARK 7839
7934 MILLER 7782
14 rows selected.(ok, not the best of examples as the mgr is already known for a row, but it demonstrates you can select prior data) -
I have hidden unwanted books from the purchased area of the iBooks store, but they're are still appearing on the front page of iOS as cloud downloads, is there a way to remove these from iBooks without using the hide iCloud books button?
Let me explain a little more. I had downloaded a lot of free books in the past as a trial when iBooks was first released and since then I have decided I no longer want them, because of this I hid them from the purchased section of the iBooks store. The 5 books left are ones I decided to keep as seen in the following picture.
This is how it appears in iBooks on my mac. There are 4 books downloaded and 1 book that I have decided not to download at this time. I would still like to keep this book available in the cloud incase I want to download it again in the future. You’ll notice that hide iCloud books is not selected, if I wanted to hide the book that I have chosen to keep in the cloud, but have not downloaded yet I could.
This is exactly how I think this feature should work. If you have hidden a book from your purchases it should not show up in the mac Ibooks app. (I am aware you can never actually delete a purchase, just hide them and that hidden purchases can be restored to your account from within the account management section of the iBooks store).
The iOS app is working differently for me. Here is a picture of the purchased tab on the iBooks store in iOS Ibooks. Again notice that pictures of Lilly is still yet to be downloaded. This is how I expected it to look.
If we visit the front page of iOS iBooks the view is very different from what I expected. Here we can see the 4 books I wanted to keep on my device and have downloaded. We can also see the 1 book I wanted to keep, but did not want to store locally on the device and left in iCloud (Pictures of Lilly). However we can also see all the books I had hidden from the purchased section of my iTunes account and which I believe should no-longer be visible, Dracula, frankenstein etc…
I am aware of the hide iCloud books button within the iOS app, but I did not need to use this to hide the books I had removed from the my purchased section of the iBooks store on the mac, why are they still appearing in iOS?
I’m still not sure if this is a software glitch or not. This article suggests to me that books can be hidden, but I had already completed these steps.
https://support.apple.com/en-us/HT201322
A browse of google also suggests people may have been able to hide past purchases from the front page of iBooks on iOS in the past.
In case there was an issue with syncing I tried logging in and out of my iTunes account via settings in iOS. Force closing the app, disabling automatic downloads and removing my device from iTunes in the cloud. Syncing with iTunes on the mac did not correct the issue either.
Interestingly I have the same issue on my iPhone 6 running iOS 8.3 as I do on my iPad mini suggesting that this might be an issue either with my account or with iOS iBooks software in general.
If there is a way to remove the already hidden iBooks in your account from the front page of iBooks on iOS without using the hide iCloud downloads button? Please help community!My apologies for the lack of photos, here is my post again with photos.
I have hidden unwanted books from the purchased area of the iBooks store, but they're are still appearing on the front page of iOS as cloud downloads, is there a way to remove these from iBooks without using the hide iCloud books button?
Let me explain a little more. I had downloaded a lot of free books in the past as a trial when iBooks was first released and since then I have decided I no longer want them, because of this I hid them from the purchased section of the iBooks store. The 5 books left are ones I decided to keep as seen in the following picture.
This is how it appears in iBooks on my mac. There are 4 books downloaded and 1 book that I have decided not to download at this time. I would still like to keep this book available in the cloud incase I want to download it again in the future. You’ll notice that hide iCloud books is not selected, if I wanted to hide the book that I have chosen to keep in the cloud, but have not downloaded yet I could.
This is exactly how I think this feature should work. If you have hidden a book from your purchases it should not show up in the mac Ibooks app. (I am aware you can never actually delete a purchase, just hide them and that hidden purchases can be restored to your account from within the account management section of the iBooks store).
The iOS app is working differently for me. Here is a picture of the purchased tab on the iBooks store in iOS Ibooks. Again notice that pictures of Lilly is still yet to be downloaded. This is how I expected it to look.
If we visit the front page of iOS iBooks the view is very different from what I expected. Here we can see the 4 books I wanted to keep on my device and have downloaded. We can also see the 1 book I wanted to keep, but did not want to store locally on the device and left in iCloud (Pictures of Lilly). However we can also see all the books I had hidden from the purchased section of my iTunes account and which I believe should no-longer be visible, Dracula, frankenstein etc…
I am aware of the hide iCloud books button within the iOS app, but I did not need to use this to hide the books I had removed from the my purchased section of the iBooks store on the mac, why are they still appearing in iOS?
I’m still not sure if this is a software glitch or not. This article suggests to me that books can be hidden, but I had already completed these steps.
https://support.apple.com/en-us/HT201322
A browse of google also suggests people may have been able to hide past purchases from the front page of iBooks on iOS in the past.
In case there was an issue with syncing I tried logging in and out of my iTunes account via settings in iOS. Force closing the app, disabling automatic downloads and removing my device from iTunes in the cloud. Syncing with iTunes on the mac did not correct the issue either.
Interestingly I have the same issue on my iPhone 6 running iOS 8.3 as I do on my iPad mini suggesting that this might be an issue either with my account or with iOS iBooks software in general.
If there is a way to remove the already hidden iBooks in your account from the front page of iBooks on iOS without using the hide iCloud downloads button? Please help community!
iPhone 6, iOS 8.3, Also an issue on my iPad mini iOS 8
Maybe you are looking for
-
The "Cold Boot Issue" - What is it all about?
Read many replys and posts, but what is it realy?
-
How to install adobe flash blocked plug in?
I am attempting to install adobe flash and it will not install so I continue to get blocked plug in
-
My external harddrive (g-drive) is not showing up
My hardrive is not showing up on my macbook anymore and is not found is disk utility either. It is on becuase th light is on when it is connected. The files on it are also really important. Any help would be geatly appreciated.
-
Newbie: Received Flash content - need help embedding
Hi, I received a web banner from one of our suppliers that I need to embed into our website. I've got it into the web page but don't know how to configure an "onclick" action. In my reading I don't find a parameter to specify what action to take if
-
Pre-requisites of upgrading a database
Hi Friends, Can anyone please tell me : 1) What are the pre-requisites to upgrade an Oracle database. 2) What are the most important things to consider before upgrading an Oracle database. 3) What is the difference between upgrading and Migrating a d