Abhishek Kaushik

+ Follow
since Mar 03, 2010
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Abhishek Kaushik

I am throwing up this question here hopefully i will get some helping words from the experts here.

I am working on java based large platform (BMC remedy) that has application to manage database. One can login with your username and password and do whatever is allowed to his group id. Now from inside that software I can launch another independent servlet application that also access the same database. My requirement is to implement the access privilege or user group access from parent application to this one knowing that there is no relation in between apart from few parameters that are passed in url. if i pass group id as another parameter one can easily temper it from browser window and gain access to unauthorized data.

another limitation is i cannot redirect user to a login window in this servlet app as this is also another third party api that allows limited customization.
is this possible? any help appreciated.
11 years ago

David Newton wrote:I'm not sure exactly what you're asking, or if you're asking two separate questions.

For the build, make sure the jar is on the compilation classpath. For the web app, make sure the jar is packaged in WEB-INF/lib.

Thanks David,

i will need your help to resolve this error.

I have added that file into class path
Windows -> Ant -> runtime -> global entries

Further they are put inside WEB-INF/lib folder too

there is more information on the background of this app that is this is not a something from scratch we are using one vendors API (Thinkmap visualizer) to build our app, which is some what J2EE standard. This application creates a thinkmap project wizard in eclipse "New project". so i have a special directory structure just like other web apps, this wizard also creates few xml files that configures database connections and other settings how to display the data in the applet. most of the time all customization can be achieved by editing those xml files but in some cases we have to add our own java classes there, one if java class i added is using yet another external jar library, which is not getting into compilation path.
Another interesting thing is this wizard has its own way to create deployable package, it has one packager library that does all jobs with Ant. this packager is neglecting my external libs

Sorry to confuse you more, please ask for more details if you need
11 years ago
Hi friends,

i am trying to deploy on web app in tomcat container, i have one third party jar api, which is working perfectly when run from eclipse but when i try to run the build using Ant tool it is not able to find that jar library which is referenced in one of class file. Needless to say I have added that library into my Any class path

Please help
11 years ago

lets say i have one swing application that does useful tasks once run, my question is what is the best way to implement licensing system into this so that after day 30 days of usage the software will stop working if not registered and user needs to activate this through some product key. this might be pertaining to general programming and not only java. please give as much as technical details

Waiting for help
11 years ago

Sagar Rohankar wrote:Resolve the scope of this, using the dot operator



is the reference to parent class this object

11 years ago
My question is;

How you access the out class object from inner class in java

for example
i have one JFrame inside i defined one ActionListener like this

here the problem is i need the reference to parent JFrame window inside actionPerformed function to do tasks like window maximize and minimize etc.

Thanks in advance
11 years ago
thank you very much Maneesh,

this will be the right way to do this, please dont take this else, if you read my second post from the top you will find that i have mentioned about JInternalFrame

- No doubt Java Ranch is very proactive community
11 years ago

I found the solution

number of getparent() will depend on hierarchy level of your frames and components this return object reference to Parent JFrame
11 years ago
thanks Michael I will try that.

My problem i have created several JInteralFrame to do that. Are there no means by which i can access parent window items through childs
11 years ago
This is generic problem i come across every time but could not get any solutions

Situation is

When you have a Parent JFrame window and Several Child Frame inside the parent Window has toolbar and StatusBar
How you handle the following requirements

1 - Based on logic of any child window how can i show a message in StatusBar which is placed in the parent window.

2 - Can I access method in the parent window via child window objects?

Thanks in advance
11 years ago

How do you know FlowLayout is the default? Did you check the layout using the getLayout() method?

I did checked using getLayout and it says this is FlowLayout moreover Sun Tutorial site also says default layout for JPanels are same

11 years ago

Maneesh Godbole wrote:Abhishek,
Welcome to the Ranch.

Why are you subclassing JComponent? You should be subclassing JPanel.
You are adding the children after making the frame visible. The call to set visible should be made after adding all the children.

Hi ,Maneesh,

SubClassing JPanle seems more logical but i have the same result....
11 years ago
Thanks Rob,

I will try to learn Layout Managers. I had removed "null" layout from the code and it should run with default FlowLayout ....but i see no difference in result. I guess it has more to do with the following cases. I tried that too but partial success only..

11 years ago
Dear friends,

I am working on a desktop program (Multi frame app) where i have a form with several JTextFields and a Button. First I created one JInternalFrame and placed all form elements there but later I found that i need to create exactly same form on a different JInternal window. So tried to separate the form code from Frame code and create another class (Sub-Class of JComponent) so that i can reuse the form code. But my code is not working properly

here is the simple code

-- Window Class --

-- Form Class --

Here i cannot see the textfield in the widow after running but its invisibility present there..I came to know this when i click on the window everywhere and textfield area started appearing....similar thing happens when i have several textfields some appear and some dont.

Please help me
11 years ago