Aji Sree

Greenhorn
+ Follow
since Jun 19, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aji Sree

Hi,

I am getting this error when validating an xml file with an xsd.

pom.xml is not valid because cvc-elt.1: Cannot find the declaration of element 'project'.

The xml file actually contains the 'project' tag. I am wondering still why this error happens!!!.

Actually I am programmatically validates a supplied xml with the schema.
ie


This xml itself contains reference to a schema 'maven-v4_0_0.xsd'.

See the start tag of the xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

Is it like that if my xml file contains reference to another schema, the programmatic comparison with the supplied schema will not take place?
Please note that I should not delete the schema which is refernced in the xml file.

Please give me a solution for this..

thank you
Ajith
Hi,

Can anybody give a hint how I can open a command prompt (in Linux as well as windows) using Runtime.getRuntime().exec() method
and run a jar file?

The idea is to run another java application from my java application and view the console debugs in the opened command prompt.

I was able to open command prompt in ubuntu linux with this.



but how should I supply the commands to run the jar file?


tried like this .



But it just opened the command prompt. thats all.

Please help..

thanks in advance
Ajith
11 years ago
Thank you guys.

I handled it with simple html tags and MouseListener to the table.



Thank you
12 years ago

Rob Camick wrote: You need to use a custom renderer



Thank you Rob.
Yes, I tried to use a custom renderer like this


When I run this code the entire row becomes yellow. I want only the cell which I clicked should become Yellow.
Also if I click cell on first row and then click on 4 th row the whole 4 rows(from first to fourth) becomes yellow.

Initially if the fore color is black, If I click on the cell that cell should only turned to yellow. Again if I click on it , it should be Green and so on. All other cells should retain whatever color it has.

Thanks


12 years ago
Hi,

Can anyone suggest a solution for this problem?

I have a JTable in which I want to set different fore colors for different cells on mouse click.(Please note that not for rows or columns but for individual cells).

ie initially if the fore color is black, If I click on the cell it should turned to yellow. Again if I click it should be Green and so on.

Also I want to set two or 3 different colors for the text in a particular cell (The text is separated with space and each of these text should be of different color!!)
When changing the fore colors I don't want to change the backcolor.It is by default the white color itself.

Thank you
12 years ago
Hi Rob,

Thank you very much for the help. I tried it in that way and the scrolling while dragging and on the mouse released event works now.
Also it scrolls fast and slow according to the distance of the scrolling.

But

- Move finger over screen for a long distance and detach finger from screen --> List scrolls a lot (fast) and then slows down and finally stops.

I am not getting the effect that is described in blue color.

Can anybody help in this issue?

Thanks
13 years ago
It is not a mobile device. It is a touch screen on a desktop machine.

What I am not getting is How can I relate the distance with the speed of scrolling. When I scroll long it should scroll fast and when takes the finger from screen scrolling should become slow and finally stop.
If I am scrolling short the list should scroll slow and when takes finger it should scroll slow and finally stop.

Thank you
13 years ago
Yes. Of course. It should work in a touch screen.
13 years ago
Hi,

Can we create IPhone scrolling in touch screen using Swing?

I have a JTable in which I want to implement this function without using the scroll arrows of Scroll bar.

The things that happens in IPhone are

- Keep finger on screen --> lists scrolls up and down, slow and fast according to finger movement (1:1).

- Move finger over screen for a short distance and detach finger from screen --> List scrolls a little (slow) and then slows down and finally stops.

- Move finger over screen for a long distance and detach finger from screen --> List scrolls a lot (fast) and then slows down and finally stops.

Thanks in advance
Ajith.
13 years ago
Hi,

Is it possible to make a tool bar using Swing and use it as an Add on for Internet explorer browser?
ie I want to make a custom toolbar for Internet explorer browser using Swing? If possible how can it be added to the browser?

Thank you
Ajith
13 years ago
Hi Maneesh,

Thank you for your reply.

It is working when I am in the top/bottom of the table.

Whether it is possible to scroll like in iPhone?

I mean scrolling up not only when top and bottom is reached but also when the finger moves up or down in the middle across several rows. Just like the iPhone.

Thank you
Ajith
13 years ago
Hi,

Can anybody please tell me if it is possible to program scrolling function through up/down movement of the finger on a touch screen?

I have a Jtable which is attached to a scroll pane.

I have two buttons on touching on which I can scroll up or down the rows of the table..

But my question is , is it possible if we move the finger over the scroll pane up or down (of course on the touch screen), whether I can scroll the records?

If so which event I should invoke? Please help if anybody have the answer.

Thank you
Ajith
13 years ago
Hi Michael,

Thank you very much for your reply.
JSplitPane seems suitable for my application.

Thank you
Ajith
13 years ago
Hi,

My contentPane has BorderLayout.

I have added a panel with gridLayout.North.
I have one JTable inside a JScrollpane and another JPanel. I have added the scrollPane and JPanel(new GridLayout(2,1)) inside another panel which is having GridBagLayout.

This panel is added to the gridLayout.Center.

The problem is with the JScrollPane and Jpanel that I have added to the GridbagLayout panel.

I want JScrollPane 30 % of the whole page width and the JTable 70% of the whole page width.

I tried giving gbc.gridx = 0;
gbc.gridy = 0;
gbc.fill = GridBagConstraints.BOTH;
gbc.weightx = .30;
gbc.weighty = 1; (when adding JScrollPane)

and gbc.gridx=1;
gbc.gridy=0;
gbc.weightx=200;
gbc.weighty=200;
gbc.fill = GridBagConstraints.BOTH;
gbc.weighty = 1; (When adding JPanel)

But it is not working fine. Especially the Jtable which is inside JScrollPane, is not increasing the width sufficiently. I want it to run in 800*600 resoluton, but the problem in display is more in that resolution.

Can anyone please help tpo find out a solution?

Thanks in advance
Ajith




13 years ago
Thanks Francois ,

I think I can follow this way.

Thank you very much for the solution.

Thank you
Ajith S
13 years ago