JPanel Functions

JPanel a = new JPanel();
a.setTransparency(color, strength);
or something like that.
a.myFunction(parameters)

Is this even possible?
I am getting sick of overiding the paint method for every panel I create and now would like to have an external class that could do this instead of having it bloat up my main interface code.

Doable, but a bad idea unless you're trying to create some sort of library of common functions that you use. If that is what you're going for create some static methods in a different class where you can call those methods from your paint method. Pass in your Graphics object or whatever objects you need to pass around.

If you're only doing this to remove bloat, don't do it though. Removing bloat isn't a good reason to introduce overhead and complicate the code more.

You don't, since you quite obviously have never heard of inheritance, class hierarchies, etc. etc..
First learn Java well, then start thinking about meddling with things like creating customised GUI libraries.

Like jwenting said, there are many concepts in OOP and Java that are more important to learn than what you're trying to do. If you're insistent, here's how you could at least learn an important concept along the way. If you make a class that extends JPanel (inheritance), you could add your own setImage method. Then when you used your class in the future, you could do things like JPanel.setImage("imagePath.jpg").

Hi. so this is actually a continuation from another question of mine[Here](https://www.daniweb.com/programming/software-development/threads/506795/dynamically-add-values-into-datagridview-cell-from-listbox-vb2010) but i was advised to start a new thread as the original question …

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...