On 9/8/2015 2:35 PM, mick wrote:
> On 08/09/2015 15:17, Doug Mika wrote:
>> On Friday, September 4, 2015 at 7:23:19 PM UTC-5, Arne Vajhøj wrote:
>>> On 9/4/2015 3:18 PM, Doug Mika wrote:
>>>> I have a beginner question. I want to write a card game and I need
>>>> to know in which "component" I could display my cards so that this
>>>> component can register clicks (on the card) and "move" the card from
>>>> one place to another. In java I used JPanel to do this. What would
>>>> the C# equivalent be?
>>>
>>> System.Windows.Forms.Panel or one of its subclasses
>>> would be my first guess.
>>>
>>> Assuming Win Forms and not WPF.
>>
>> And if I'm using WPF?
>
> You will get component Click events from all WPF Panel types. I have no
> clue what a Jpanel does so it's difficult to suggest the equivalent. The
> Grid is general purpose enough and should do what you want though. Try
> that.
A JPanel is just a simple container component that you can add
other components to. Behavior is managed by adding a layout manager
to the JPanel - so one add BorderLayout, FlowLayout or GridLayout or
something else depending on what one want (if you don't know Swing
then you don't know those, but the names indicate what they do).
Arne