How to make my page can detect textbox move ment
i want to create a java GUI which will do the actionPerformed after the textbox value been change after that the GUI have to set the focus back to the textbox and clear up the value inside...
this is my coding,how to modify it to let me to performed this kind of action:import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class attGUI extends JFrame implements ActionListener{
private JTextField id;
private JLabel label1;
private JLabel topLabel;
private JButton ok;
public attGUI (String title){
buildGUI();
setTitle(title);
pack();
setVisible(true);
//JFrame.setSize(32);
private void buildGUI(){
Container contentPane=getContentPane();
contentPane.setLayout(new BorderLayout());
id=new JTextField(10);
label1=new JLabel("Student ID");
topLabel=new JLabel("Welcome to Student Attendance System!!!");
topLabel.setFont(new java.awt.Font("Franklin Gothic Demi", 1, 18));
ok=new JButton("OK");
ok.addActionListener(this);
JPanel inputPanel=new JPanel();
inputPanel.add(label1);
inputPanel.add(id);
contentPane.add("North",topLabel);
contentPane.add("Center",inputPanel);
contentPane.add("South",ok);
public void actionPerformed(ActionEvent e){
if(e.getSource() == ok)
String Stuid= id.getText();
attend a= new attend(Stuid);
public static void main(String args[])
new attGUI("Student Attendance System");
}
May I suggest you read this [url http://java.sun.com/developer/JDCTechTips/2005/tt0518.html#1]VALIDATING TEXT AND FILTERING DOCUMENTS ?
Similar Messages
-
How to make single page can only be accessed by one user at the same time
While a user is accessing a page and modifying the data in this page. Other users are blocked for this page. How can it be realized?
Any ideas or help are appreciated.
Edited by: wahaha on Oct 6, 2008 2:49 AMwahaha wrote:
While a user is accessing a page and modifying the data in this page. Other users are blocked for this page. How can it be realized?Assuming your scenario as you havnt mention anything. So means there are n number of users and you want that if any one of them accessing this page then nobody else will have access to that page.
-> Use flag in DB and whenever user accessing that page set the flag 1 after login and check condition while other user login.
-> After logout back to 0.
Well this is possible one of the solution, not the best one.Try to find some other also.
Sachin Kokcha -
how to make a page header
Lynn,
Numbers 3 currently doesn't have page headers.
However, there are some workarounds that can achieve the effect of having headers (though, for footers, you're limited to page number). See this in Print Preview:
You can set up extra Header Rows in your table and have them repeat on each printed page. The Table Name only shows on the first printed page, so you may want to uncheck Table Name before printing:
See this thread for an example of how this workaround worked for one user.
SG -
Hi every body, and thank you for reading my post, here's the question I have
Does anybody know how can I make a page reload???
Thank'sIf you mean how to make the page reload when someone pushes a button or clicks an action component such as a hyperlink, then have that component's action method return null. To create the action method for a component, double click the component in the Visual Designer.
To make the page reload after someone selects from a drop-down or list, or when the user changes the value in an input text field, right-click that component and choose Auto-Submit on Change.
Chris -
How to make Login Page in ADF?
Hi,
Can anyone suggest me, how to make Login Page in ADF.
I am new on ADF, is any sample code or application is there than it will be helpful for me.
please reply its urgent.
Thanks,
Ramit MathurHI,
Jspx code
<af:panelFormLayout id="pfl1" binding="#{loginBean.mainForm}">
<f:facet name="footer"/>
<af:inputText label="Username" id="it1"
value="#{loginBean.username}"
binding="#{loginBean.usernameId}"
required="true"/>
<af:inputText label="Password" id="it2" secret="true"
value="#{loginBean.password}"
binding="#{loginBean.passwordId}"
required="true"/>
<af:spacer width="1px" height="20px" id="s3"/>
<af:panelGroupLayout id="pgl3">
<af:commandButton text="Submit" id="cb1"
action="#{loginBean.doLogin}"/>
<af:spacer width="85px" height="1px" id="s4"/>
<af:commandButton text="Cancel" id="cb2"
action="#{loginBean.clearFields}"/>
</af:panelGroupLayout>
</af:panelFormLayout>
BackingBean code
public String doLogin() {
String un = _username;
String pw = _password;
// byte[] pw = _password.getBytes();
FacesContext ctx = FacesContext.getCurrentInstance();
System.out.println("ctx" + ctx);
HttpServletRequest request =
(HttpServletRequest)ctx.getExternalContext().getRequest();
CallbackHandler handler = new SimpleCallbackHandler(un, pw);
System.out.println("Handler" + handler);
try {
Subject mySubject = Authentication.login(handler);
System.out.println("mySubject" + mySubject);
ServletAuthentication.runAs(mySubject, request);
ServletAuthentication.generateNewSessionID(request);
String loginUrl =
"/adfAuthentication?success_url=/faces" + ctx.getViewRoot().getViewId();
System.out.println("loginUrl---" + loginUrl);
HttpServletResponse response =
(HttpServletResponse)ctx.getExternalContext().getResponse();
System.out.println("response---" + response);
// loginUrl = "/adfAuthentication?success_url=/faces/WelcomeScreen1.jspx";
sendForward(request, response, loginUrl);
System.out.println("---" + response);
} catch (FailedLoginException fle) {
FacesMessage msg =
new FacesMessage(FacesMessage.SEVERITY_ERROR, "Incorrect Username or Password",
"An incorrect Username or Password" +
" was specified");
ctx.addMessage(null, msg);
} catch (LoginException le) {
reportUnexpectedLoginError("LoginException", le);
return null;
private void sendForward(HttpServletRequest request,
HttpServletResponse response, String forwardUrl) {
FacesContext ctx = FacesContext.getCurrentInstance();
System.out.println("sendForward--ctx--" + ctx);
RequestDispatcher dispatcher =
request.getRequestDispatcher(forwardUrl);
System.out.println("sendForward--dispatcher--" + dispatcher);
try {
dispatcher.forward(request, response);
} catch (ServletException se) {
reportUnexpectedLoginError("ServletException", se);
} catch (IOException ie) {
reportUnexpectedLoginError("IOException", ie);
ctx.responseComplete();
// 12.Implement a reportUnexpectedLoginError() method:
private void reportUnexpectedLoginError(String errType, Exception e) {
FacesMessage msg =
new FacesMessage(FacesMessage.SEVERITY_ERROR, "Unexpected error during login ",
"An incorrect Username or Password" +
" was specified");
FacesContext.getCurrentInstance().addMessage(null, msg);
e.printStackTrace();
} -
I'm not techinal so please bear with me. I don't have the bar that allows me to type in a website. I did have a few minutes ago. When I make the page full screen and move my cursor to the top of the page, the bar drops down and I can use it. I've tried restarting my computer, didn't work. Help!
Well I figured it out, right click the arrow that makes the screen bigger and unclick the Hide Toolbar. I knew it couldn't be that hard.
-
How to make a page break in numbers
The only way I found to make a new page in Numbers was to make new rows down to where the page would break, but it's only letting me add a few new rows to the new page. I'd like to know how to make a page break without just adding rows.
Hi Yellowbox,
Still I'm not convinced, it gives you indeed some advantages but this page break is a great fault.
All the company is working on Apple, we try even to keep Microsoft away but what when you make a quote of several pages and have to make your lay out at the end, it is a pain in your xxx to make it well.
We cannot make different tables for each page nor I want to make it in Pages with a Numbers table.
Secondly, what do you do when you get a Excell offer that you want to bring to Numbers.
It opens well but again, you need to make all the page lay out afterwards!
Thanks for yoru reply.
It won't change my mind about Apple and Microsoft but for timing earning I won't changes all Excel offers to Numbers anymore. Even if I do not want, it would take me less time to work it out in Excel.
Our own offers will remain in Numbers ...
It is a pity but time is so important nowadays!
Nice week-end. -
How to make turning page with ibooks author?
How to make turning page with ibooks author?
This question has been answered on this thread
https://discussions.apple.com/message/17981772#17981772#17981772
Best regards.
Alex -
How to make BBSAK able to detect 9860 - White Screen
Hi Guys
Need serious help here. My 9860 (7.0) is showing 'white screen'. It happened since I tried to reload OS using BBSAK. Seems I choose wrong menu. As adviced by an expert, I have to wipe it again to see 507 error code. I tried to wipe it through BBSAK but Unfortunately BBSAK didn't detected the device anymore.
My question is: How to make BBSAK able to detect my device.
The situation are as follow:
1. BB Desktop Manager & Apploader detected my device (means USB driver are installed correctly & using OEM USB cables and good USB Port.). Trying to reload OS through these apps still stacked at the white screen (75%), same as through web uploader.
2. Already uninstall and reinstall BBSAK, Rrestore my laptop system, modify compatibility program of BBSAK, and tricks in windows task manager to avoid conflict between BBDM and BBSAK, still failed.
3. Clean Uninstall BBDM and BB Link and reinstall BBDM 7.0 Version only (BBDM 7.1 seems not reliable-for me).
4. Tried to wipe using JL_Cmder & Vnbbutils, both didn't execute wipe process.
5. Registry Cleaner using CCleaner.
Additional info: BBSAK detected my 9860 once when I was using BBDM 7.0 but since I upgraded to BBDM 7.1, it didn't detected anymore, so I had removed BBDM 7.1 and reinstall BBDM 7.0.
The result is: BBSAK still didn't detect my 9860.
Helps will be greatly appreciated. Thanks in advance for your time & effort.
Regards,
Arthur.
• Click Likes to appreciate those who helps you
• If your issue solved, mark the best post in your thread as SolutionWhen I do that it only makes a short portion (the top video) color somehow it shortens the clip to 2 seconds, I tried to edit for the full 47 second clip (just a sample to play with) but it keeps going back to 2 seconds for the top video.
Any other ideas? I do have Final Cut Pro as well as Adobe After Effects as well, but I just figured iMovie would be easiest way to do this simple effect... -
When the page will be load how to make the page blank in run time
Dear
when i will run the page the fields shoud come with blank Field.
i want to make it in runtime.
example- i have one page having employees data. but when i will run that page the data will not come only blank fields should come, after thar i will create.duplicate how to make the page blank field in runtime
-
How to make the page expired when user click back
how to make the page as expired when i click back button on the browser.
i want a better way.
actually i have a timer.when it reaches 00.00 then the expired page will be called automaticlly using location.href="expired.jsp" then if the user clicks back it should not show the previous page.this concept is applied with paging concept
response.setheader is not working ...
i have redirect when click back using
<body onunload>....i call another page here.
but it is not a good way.
so pls help me to solve this problem
using session or another good wayUse this instead.
Frame.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); -
How to make a snapshot out of a movie file?
How to make a snapshot out of a movie file and integrate this snapshot into the movie? Thanks, Wolfgang
Either you use the Hold function from the Retiming popup or you export an image and reimport it.
-
How to make a page blind accessible
Hey Y'all, I run a website for a die-cast toy car
manufacturer (
Liberty Promotions - View
it here ), The way the page is designed primarily uses images,
of the cars, and of the descriptions (we do this so we can control
the font, for Pirates 2, we use a pirate font found online, so the
"look" is the same) and pretty much everything else. Yes I know its
a lot of images, its heavy on the download time, and its a pain to
edit. But my boss likes it that way, and so thats the way, at least
for now, that it is going to stay. We havent had many complaints
about it till now, and this one threw me for a loop:
One of our clients won a contest we are running to submit
possible suggestions to be made into our die-cast cars, this
client's suggestion was taken as this times winner and we are
starting to produce the cars. On the site when someone wins we
display a photo, and a synopsis about them and there collection.
While talking to this guy telling him what I needed, he infomed me
that his is blind., but still collects our products, (very much a
"seeing is believing" type of product") I was flabergasted, and
then he said he had a comment, that (go figure) our site being very
much image based does not translate well onto his page reader
(windows- eyes), So I talked to him a little more and decided that
especially for the car he "visualized" I would make an effort to
make it very Windows-Eyes friendly, so that he could get the full
description of the buses, the schedule, etc... using his reader,
and not have to call in someone else to read it for him. Of course
I would like to start building this into all my future pages, just
to make it easier for him and for anyone else in the same
situation. But, I dont know where to start. Can anyone give me some
good suggestions on how to do this? Can I use a <div
class"visibility: hidden;"> to hide the same text that is on the
graphics (i.e.- Take the text from the description in PS and
Copy/Paste into DW) and then have it be hidden from all Visual
readers, or should I do something different? Please help, I know I
would appreciate it, and so would he!
ThanksThierry | www.TJKDesign.com wrote:
> Osgood wrote:
>
>>Thierry | www.TJKDesign.com wrote:
>
>
>>>The OP asked about making his web site accessible
to
>>>*screen-readers*, not to "everybody".
>>>For a screen-reader user, the size of text
graphic is *irrelevant*.
>
>
>>So why is it that many accessible sites lack text
imagery, perhaps
>>less than those that are not claiming to be
accessible. I would
>>assume that if you can't see very well and use a
screen reader it
>>doesnt matter how many text images you use so long as
you have some
>>alt text explaining what it is.
>
>
> Graphic text is more an issue for what you call
"regular" people than for
> Assistive Technology (AT) users.
> Not all people who can't read small text need to use AT
> My eyesight is not too bad but not too good either. I
use browsers with
> their default settings, if I ran into a site on which
text is too small for
> my liking, I don't reach for glasses, I just leave that
site.
I'm not suggesting using body text as graphics. Most
'decorative'
graphics that contain text are of sufficient size that anyone
with what
you call 'regular' eyesight will be able to read the text. If
they don't
fall into the 'regular' bracket then most likely they need a
screen reader.
People leave the site for many reasons...one being typically
uninspiring.
>>>I found many of the sites you call "awfully
boring accessible
>>>sites" not really "attractive" at first, but it
turns out that they
>>>are the ones today I visit the most. I don't see
that "awful boring
>>>look" you're talking about anymore, I just see
what's for me
>>>*valuable content* delivered without distracting
visual effects and
>>>stuff.
>>
>>What's good for one isn't always necessarily good for
another, thank
>>goodness ;)
>
>
> You're bringing everything back to "design" but web
design is not the same
> as "web design".
> Go to Dallas in September:
>
http://www.webjamsession.com/sessions/why_good_content_must_suck/
How is saying that everyone has different opinions on what
they like and
dislike bringing everything back to design? You just fail to
see
anything other than from your own point of view which makes
you a bit
typecast, in my opinion
>>>So, bottom line is to know if these authors are
design-challenged or
>>>in fact pretty smart since they "designed" web
sites that make
>>>people keep coming back ;)
>>
>>No one knows anything for sure and those that assume
they do are just
>>fooling themselves, no-one else ;)
>
>
> I believe log files can be trusted ;)
You only have access to your own log files not every other
persons site
logs. Again YOU think you know everything based on your own
experience.
People have different experiences but only yours seems to be
correct.
>>>If you visit sites that talk about accessibility
you can't really
>>>expect to see Flash animations and "super cool
designs", but that's
>>>because of the audience of these web sites not
because of
>>>Accessibility "features".
>>
>>Developeres with good intentions go to these sites to
see what 'true'
>>accessibility is all about. They see mostly sterile
looking sites and
>>think again. If these accessible information sites
did something to
>>improve their visual appeal that would be a
help....but I guess thats
>>unlikely because as you say they actually don't care
about
>>presentation.
>
>
> Design and presentation are two very different beast on
the web.
Thats complete rubbish....design and presentation are
interlinked.
> I'd say they do not care for design, but they do care
for presentation;
> that's why I mentionned in a previous post the first
heading being almost
> below the fold ;)
> I just read one of the most interesting article I've
read about the title
> attribute, I'd say there was almost no "design" at all
attached to it but I
> wouldn't want it styled differently.
That's because you cannot distinguish between general
information sites
and sites which need to sell. Once you do that we can hold a
sensible
debate.
You don't usually have to buy general information you do have
to buy
products.
>>Its hard to push for accessibility when it 'appears'
you are limited
>>in what elements you can use or ideally should'nt use
according to the
>>sites which address accessibility. In my opinion they
do nothing to
>>help the cause of accessibility. If their sites could
be presented
>>better visually....I guess they can't because some
are so basic and
>>those that are not I don't know what level of
accessibility they
>>adhere too.
>
>
> Once again, it is the choice of the authors of these
sites (or their lack of
> design skills may be), but not the results of following
Accessibility
> guidelines.
That's not helping to push accessibility though is
it.......I'm trying
to help accessibility along a bit here ;)
>>I was sifting though some of the sites at GAWDS a few
weeks ago. Some
>>are really quite nice, some are not very inspiring.
Some don't work in
>>some browsers as well as they could and should
do.........go figure.
>>It appears that anything goes. Its great to talk
about this and that
>>but when it comes down to it those that talk the talk
sometime fail to
>>deliver and then make poor excuses for not delivering
when challenged.
>
>
> I don't know where you want to go with this.
> GAWDS's "site of the month" is not like
www.accessites.org awards.
> There is nothing "formal" in the process we go through
when rating these
> sites.
If that is true, which I doubt its meaningless and once again
confuses
accessibilty issues.
>>>What is not my "personal cup of tea" for example
are "cool sites"
>>>with images and things in header/banner that
place the first heading
>>>almost below the fold ;)
>
>
>>We all have likes and dislikes.
>
>
> I think there are things outside of this "we all have
likes and dislikes", I
> believe there are common issues in web design that are
known to be "bad
> things/ideas to implement" there are no aesthetic or
design considerations
> there because *best practice* goes beyond that.
I'll say again what you consider to be 'best practices' other
people may
not.
>>>I used the web to get information; for me as a
user, "visual
>>>experience" comes *second*.
>>
>>Ideally I would like a combination of both but if a
site looks
>>distinctly uninteresting and I don't 'really' need
the information
>>that desperately I usually go on to one that is
presented a little
>>more excitingly.
>
>
> I agree that the best is to have a good balance of both,
but again I don't
> think this is an issue with Accessibility per se. It is
most of the time
> because of the author (lack of design skills) or because
of the client (no
> budget for accessibility).
Its something we don't really know and as such is difficult
to debate.
>>I've said before you have to take a number of issues
into
>>consideration at the outset before you committ to
anything. I don't
>>approach jobs with a sterotypical mindset. In my
opinion projects
>>need to be approached differently and with different
sets of values.
>
>
> Who said otherwise?
> Actually, if you put Accessibility into the picture, you
do need to think a
> bit out of the box since it makes the project more
challenging ;)
One needs to take everything into consideration and make the
right
decision. Of course whether one makes the correct decision is
very
personal to what they believe is important and not so
important. -
How to make a page that should be inside an iframe load up its parent page?
Hello all
Here's my dilema...
I'm creating a site with page fragments that the user is able to view by having it load into an iframe. So far so good and it's all working perfectly well.
The problem that I envisage is that, even with no-index robot meta tags, Google et al are almost certain to index these page fragments and proffer them in search results.
So, my question to you is two-fold:
1 - how can I make a page fragment load up the parent page should it be selected from a Google search result
and
2 - once the parent page is loaded up, how can I then make it load the selected content page into the iframe so that the user sees what (s)he is expecting to see?
I'm imagining that it will require cookies and scripting, but I'm still at the (very) early stages of learning such stuff, so have no clue whatsoever on how to go about it!
Any bright ideas / tutorials / sites I can nick code from / complete solutions that I don't have to pay for would be much appreciated.
Thanks
PeterAFAIK there's no practical way to do what you require. Sorry. This is one of the many downsides to Framed sites. It also makes bookmarking and printing pages difficult. Not to mention user unfriendly from a web accessibility viewpoint. Re-think your need for Iframes throughout an entire website. The best websites use one complete page for each topic. Index, About Us, Contact Us, etc...
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb -
How to make a page that should be inside an iframe load up it's parent page?
Hello all
Here's my dilema...
I'm creating a site with page fragments that the user is able to view by having it load into an iframe. So far so good and it's all working perfectly well.
The problem that I envisage is that, even with no-index robot meta tags , Google et al are almost certain to index these pages fragments and proffer them in search results.
So, my question to you is two-fold:
1 - how can I make the page fragments load up the parent page should it be selected from a Google search result
and
2 - once the parent page is loaded up, how can I then make it load the selected content page into the iframe so that the user sees what (s)he is expecting to see?
I'm imagining that it will require cookies and scripting, but I'm still at the (very) early stages of learning such stuff, so have no clue whatsoever on how to go about it!
Any bright ideas/tutorials/sites I can nick code from/complete solutions that I don't have to pay for would be much appreciated.
Thanks
PeterActually, I did carefully choose this forum as being the most appropriate since my question, or rather what I imagine the answer might be, will involve things like scripting and/or cookies.
Would that not make it "dynamic" enough to remain here?
Thanks
Peter
Maybe you are looking for
-
I am trying to get my husbands iPad on the same apple I'd as our other 4 devices, I have tried deleting the iCloud account and reinstalling it withe the correct one. I have also tried the appleid site, no good. I do not want to put in another passwo
-
My brand new iphone5 will not connect to my home wifi even though it recognizes it. My ipad and my old iphone4s connect with no problem. Any thoughts?
-
My DVD drive is not working properly
Hi all, Hope you can help, I have been trying to play previously working DVDs on my iBook this evening, and it will not work. I have put in a music CD and it worked fine. I repaired my permissions, ran macjanitor and restarted the machine (also left
-
What device can I use to transfer photos from Iphone5s. Don't want to use my computer.
What external device besides my computer can I use to transfer photos from my Iphone 5s. Do I have to transfer to my computer and then external device?
-
Hi, Can an Excel spreadsheet be placed into a InDeisgn document without losing the formating of the Excel spreadsheet? Thanks, Barb